IPython 3.5 returns "bad interpreter: no such file or directory"
I am getting random error when trying to use IPython. Now I suddenly can't use iPython3 without explanation, I can't remember to install anything heavy other than the Ethereum client, and I didn't download hashes or whatever. All of a sudden I get:
cchilders:~
$ ipython3
-bash: /usr/local/bin/ipython3: /usr/local/opt/python3/bin/python3.5: bad interpreter: No such file or directory
neither IPython nor IPython3 worked. After uninstalling and reinstalling Python and Python3, I can now use IPython. But the same error happens because of this when I try iPython3.
This is one of the most absurd errors I have seen because I reinstalled IPython, Python itself and Python3 unchanged.
source to share
As described here , the problem is that ipython3 is trying to use the python3.5 kernel in /usr/local/opt/python3/bin/python3.5
. You can see which kernel ipython3 is trying to use by running:
jupyter kernelspec list
and then viewing the file kernel.json
that is in the python3 kernel path (in my case the path to kernel.json :) /usr/local/share/jupyter/kernels/python3/kernel.json
.
To fix this problem, I had to reinstall all of the following jupyter packages:
$ pip3 uninstall jupyter jupyter-client jupyter-console jupyter-core
$ pip3 install jupyter jupyter-client jupyter-console jupyter-core
source to share