IPython 3.5返回“错误的解释器:没有这样的文件或目录”

2024-04-30 02:08:45 发布

您现在位置:Python中文网/ 问答频道 /正文

我在尝试使用IPython时出现随机错误。我现在突然无法毫无解释地使用iPython3,我不记得除了Ethereum客户端之外安装了什么重的东西,我也没有下载散列或任何东西。突然我明白了:

cchilders:~ 
$ ipython3
-bash: /usr/local/bin/ipython3: /usr/local/opt/python3/bin/python3.5: bad interpreter: No such file or directory

IPython和IPython3都不工作。在卸载并重新安装Python和Python3之后,我现在可以使用IPython了。但如果我尝试iPython3,同样的错误也会发生。

这是我看到的更荒谬的错误之一,因为我已经重新安装了I Python、Python本身和Python3,没有任何更改。


Tags: bash客户端binusrlocal错误ipythonpython3
1条回答
网友
1楼 · 发布于 2024-04-30 02:08:45

here所述,问题是ipython3试图在/usr/local/opt/python3/bin/python3.5中使用python3.5内核。您可以通过运行以下命令查看ipython3试图使用的内核:

jupyter kernelspec list

然后查看python3内核路径中的kernel.json文件(在我的例子中,kernel.json的路径是:/usr/local/share/jupyter/kernels/python3/kernel.json)。

要解决这个问题,我必须重新安装以下所有jupyter软件包:

$ pip3 uninstall jupyter jupyter-client jupyter-console jupyter-core
$ pip3 install jupyter jupyter-client jupyter-console jupyter-core

相关问题 更多 >