Reputation: 645
EDITED
I'm very new to python and have a probably super basic question. I've installed Jupyter Notebook by installing anaconda which includes python 3 by default. Now I want to use an external toolbox which still works with python 2.7, so I'm trying to get e kernel with python 2.7 as suggested here. In the Anaconda Prompt I'm typing
python2 -m pip install ipykernel
python2 -m ipykernel install --user
But it says that it couldn't find the command "python2". Any idea?
Upvotes: 1
Views: 9177
Reputation: 576
I had the same issue. You can try starting jupyter-notebook
from python2
$ python2 /path/to/jupyter-notebook
in my case running python2 /usr/bin/jupyter-notebook
fixed the issue.
shebang in my case
$ head -1 /usr/bin/jupyter-notebook
#!/usr/bin/python3.4
$
Upvotes: 2
Reputation: 645
I still don't know why it doesn't work, but i found out what worked instead. Using
conda create -n ipykernel_py2 python=2 ipykernel
activate ipykernel_py2
python -m ipykernel install --user
in the Anaconda Prompt added the option to open a python 2 notebook in the Jupyter Notebook. Also I can change the Kernel now to python 2.
Upvotes: 0
Reputation: 1644
Have you tried looking at the Jupyter Notebook homepage?
Just use
pip install jupyter
or
pip install jupyter --user
Upvotes: 0