Anaconda文件在2个不同的驱动器中?帮助Anaconda + Jupyter笔记本无法正常工作

时间:2019-09-09 22:18:17

标签: python jupyter-notebook anaconda

我的计算机上有两个驱动器,一个C驱动器和一个D驱动器。我已经在D驱动器上安装了所有anaconda文件,但无法打开Jupyter笔记本电脑。似乎Anaconda正在尝试从C驱动器导入文件并返回回溯错误。 我该如何解决?

我从C盘中删除了所有anaconda文件,但没有用。

(base) C:\Users\YEV>jupyter notebook --notebook-dir=D:\DataScience\Anaconda
Traceback (most recent call last):
  File "D:\DataScience\Anaconda\Scripts\jupyter-notebook-script.py", line 6, in <module>
    from notebook.notebookapp import main
  File "C:\Users\YEV\AppData\Roaming\Python\Python37\site-packages\notebook\notebookapp.py", line 47, in <module>
    from zmq.eventloop import ioloop
  File "C:\Users\YEV\AppData\Roaming\Python\Python37\site-packages\zmq\__init__.py", line 47, in <module>
    from zmq import backend
  File "C:\Users\YEV\AppData\Roaming\Python\Python37\site-packages\zmq\backend\__init__.py", line 40, in <module>
    reraise(*exc_info)
  File "C:\Users\YEV\AppData\Roaming\Python\Python37\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
    raise value
  File "C:\Users\YEV\AppData\Roaming\Python\Python37\site-packages\zmq\backend\__init__.py", line 27, in <module>
    _ns = select_backend(first)
  File "C:\Users\YEV\AppData\Roaming\Python\Python37\site-packages\zmq\backend\select.py", line 28, in select_backend
    mod = __import__(name, fromlist=public_api)
  File "C:\Users\YEV\AppData\Roaming\Python\Python37\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
    from . import (constants, error, message, context,
ImportError: cannot import name 'constants' from 'zmq.backend.cython' (C:\Users\YEV\AppData\Roaming\Python\Python37\site-packages\zmq\backend\cython\__init__.py)

我只希望能够运行anaconda和Jupyter笔记本。

现在,我了解某些文件位于C驱动器中,而某些文件位于D驱动器中。不知道为什么。我该如何解决?

(base) C:\Users\YEV>jupyter --paths
config:
    C:\Users\YEV\.jupyter
    D:\DataScience\Anaconda\etc\jupyter
    C:\ProgramData\jupyter
data:
    C:\Users\YEV\AppData\Roaming\jupyter
    D:\DataScience\Anaconda\share\jupyter
    C:\ProgramData\jupyter
runtime:
    C:\Users\YEV\AppData\Roaming\jupyter\runtime

谢谢。

1 个答案:

答案 0 :(得分:0)

默认情况下,anaconda在$ Users $目录中安装自身和python软件包(通过pip?)。

如果删除它们,则软件包将消失。

我建议您从头开始重新安装anaconda。