gpt4 book ai didi

python - 全新安装后无法运行 `jupyter notebook`

转载 作者:行者123 更新时间:2023-11-28 21:42:46 27 4
gpt4 key购买 nike

我做到了:

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

谢谢。

最佳答案

似乎一些 Matplotlib 用户遇到了类似的问题(参见 there )并通过重新安装 dateutil 解决了这个问题。

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

您可能想尝试使用较新的版本(最新版本是 2.6)。

关于python - 全新安装后无法运行 `jupyter notebook`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43144917/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com