我做了:
pip install --upgrade pip
pip install jupyter
jupyter notebook
我收到以下错误:
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
感谢。
答案 0 :(得分:5)
似乎有些Matplotlib用户遇到了类似的问题(请参阅there)并通过重新安装dateutil
解决了这个问题。
sudo pip uninstall python-dateutil
sudo pip install python-dateutil==2.2
您可能想尝试使用较新版本(最新版本为2.6)。