gpt4 book ai didi

python - 安装 iPython : "ImportError cannot import name path"?

转载 作者:IT老高 更新时间:2023-10-28 21:51:50 27 4
gpt4 key购买 nike

我正在尝试安装 IPython。我已经运行 pip install ipython[notebook] 没有任何错误,但现在我明白了:

$ ipython notebook
Traceback (most recent call last):
File "/Users/me/.virtualenvs/.venv/bin/ipython", line 7, in <module>
from IPython import start_ipython
File "/Users/me/.virtualenvs/.venv/lib/python2.7/site-packages/IPython/__init__.py", line 48, in <module>
from .terminal.embed import embed
File "/Users/me/.virtualenvs/.venv/lib/python2.7/site-packages/IPython/terminal/embed.py", line 16, in <module>
from IPython.core.interactiveshell import DummyMod
File "/Users/me/.virtualenvs/.venv/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 31, in <module>
from pickleshare import PickleShareDB
File "/Users/me/.virtualenvs/.venv/lib/python2.7/site-packages/pickleshare.py", line 41, in <module>
from path import path as Path
ImportError: cannot import name path

如果我尝试在 Python 控制台上运行 import picklesharefrom path import path,我也会遇到同样的错误。

我能做些什么来解决这个问题?

最佳答案

看起来这是一个 known issue ,由 path.py 包中的更改引起。恢复到旧版本的 path.py 可以解决这个问题:

sudo pip3 install -I path.py==7.7.1

关于python - 安装 iPython : "ImportError cannot import name path"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32252122/

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