我是python和虚拟环境新手。更新conda后,我在打开jupyter Notebook和Spyder时遇到了问题。

以下是有关我拥有的版本的一些信息:

 $ conda info

     active environment : None  '''is it caused by this ? '''
       user config file : /Users/-/.condarc
 populated config files : /Users/-/.condarc
          conda version : 4.5.4
    conda-build version : 3.0.27
         python version : 2.7.14.final.0
       base environment : /Users/-/anaconda2  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/osx-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/osx-64
                          https://repo.anaconda.com/pkgs/pro/noarch
          package cache : /Users/-/anaconda2/pkgs
                          /Users/-/.conda/pkgs
       envs directories : /Users/-/anaconda2/envs
                          /Users/-/.conda/envs
               platform : osx-64
             user-agent : conda/4.5.4 requests/2.18.4 CPython/2.7.14 Darwin/15.5.0 OSX/10.11.5
                UID:GID : 501:20
             netrc file : None
           offline mode : False


JupyerNotebook version : 5.5.0
Jupyter version : 4.4.0
Spyder version : 3.2.8


Spyder无法启动,当尝试从anaconda导航器启动spyder时出现此错误:

/anaconda2/lib/python2.7/site-packages/zmq/backend/cython/init.py“,第6行,在
    来自。导入(常量,错误,消息,上下文,
    ImportError:dlopen(/ Users /-/ a​​naconda2 / lib / python2.7 / site-packages / zmq / backend / cython / error.so,2):库未加载:@ rpath / libsodium.23.dylib
    引用自:/Users/-/anaconda2/lib/libzmq.5.dylib
    原因:找不到图片

尝试从anaconda启动jupyter笔记本会引发相同的image not found错误:

/anaconda2/lib/python2.7/site-packages/zmq/backend/cython/init.py“,第6行,在
        来自。导入(常量,错误,消息,上下文,
    ImportError:dlopen(/ Users /-/ a​​naconda2 / lib / python2.7 / site-packages / zmq / backend / cython / error.so,2):库未加载:@ rpath / libsodium.23.dylib
      引用自:/Users/-/anaconda2/lib/libzmq.5.dylib
      原因:找不到图片

我发现更新后,仅为zmq文件/anaconda2/lib/python2.7/site-packages/zmq/backend/cffi/__pycache__初始化了一个新的Anaconda2文件夹。

一切运行正常,但是按照anaconda的说明和建议进行更新后,我开始遇到这些错误。

我该如何解决这个问题?是因为active environment : None吗?

最佳答案

面临同样的问题。从https://github.com/jupyter/notebook/issues/1632中,它解释了更新conda时的一些依赖关系被弄乱了,因此请尝试:

conda remove zeromq
conda install zeromq


然后尝试:

conda update conda-build


祝好运,

关于python - 当找不到图片时,启动Spyder和JupyterNotebook会导致importError,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/50584217/

10-12 21:07