【问题标题】:ipython security lib missingipython 安全库丢失
【发布时间】:2023-02-26 16:31:40
【问题描述】:

问候,

根据 IPython 的说明,我应该能够在编码时运行此导入:

from IPython.lib.security import passwd_check

作为 jupyter 安装的一部分,我安装了 IPython 8.8.0。

然而,当我尝试运行这个库时,它报告:

ModuleNotFoundError: No module named 'IPython.lib.security'

我错过了什么? 谢谢

【问题讨论】:

    标签: python python-3.x jupyter-notebook ipython


    【解决方案1】:

    在我看来,IPython.lib.security 在 8.x 版中不再存在。

    如果您使用的是版本7x,您应该可以导入它。

    我能够成功导入:

    from IPython.lib.security import passwd_check
    

    在我的7.x 版本

    IPython.__version__
    '7.25.0'
    

    如果你想降低版本,你可以尝试:

    %pip install IPython==7.25.0
    

    【讨论】:

      猜你喜欢
      • 2012-10-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-08
      • 2015-01-10
      • 1970-01-01
      • 2014-03-01
      • 2014-03-12
      相关资源
      最近更新 更多