简体   繁体   中英

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 .

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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