简体   繁体   English

全新安装后无法运行“ Jupyter Notebook”

[英]Can't run `jupyter notebook` after fresh installation

I did: 我做了:

pip install --upgrade pip
pip install jupyter
jupyter notebook

And I get the following error: 我得到以下错误:

    Traceback (most recent call last):
  File "/usr/local/bin/jupyter-notebook", line 7, in <module>
    from notebook.notebookapp import main
  File "/Library/Python/2.7/site-packages/notebook/notebookapp.py", line 61, in <module>
    from .services.kernels.kernelmanager import MappingKernelManager
  File "/Library/Python/2.7/site-packages/notebook/services/kernels/kernelmanager.py", line 16, in <module>
    from jupyter_client.multikernelmanager import MultiKernelManager
  File "/Library/Python/2.7/site-packages/jupyter_client/__init__.py", line 7, in <module>
    from .manager import KernelManager, run_kernel
  File "/Library/Python/2.7/site-packages/jupyter_client/manager.py", line 32, in <module>
    from .session import Session
  File "/Library/Python/2.7/site-packages/jupyter_client/session.py", line 51, in <module>
    from dateutil.tz import tzutc
  File "/Library/Python/2.7/site-packages/dateutil/tz/__init__.py", line 1, in <module>
    from .tz import *
  File "/Library/Python/2.7/site-packages/dateutil/tz/tz.py", line 23, in <module>
    from ._common import tzname_in_python2, _tzinfo, _total_seconds
  File "/Library/Python/2.7/site-packages/dateutil/tz/_common.py", line 2, in <module>
    from six.moves import _thread
ImportError: cannot import name _thread

Thanks. 谢谢。

It seems that some Matplotlib users had similar issue (see there ) and solved it by re-installing dateutil . 这似乎有些Matplotlib用户也有类似的问题(见那里 ),并通过重新安装解决它dateutil

sudo pip uninstall python-dateutil
sudo pip install python-dateutil==2.2

You might want to try with a newer version (the latest is 2.6). 您可能要尝试使用较新的版本(最新版本为2.6)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM