Jupyter Notebook-安装python 2 [英] Jupyter Notebook - install python 2
问题描述
已编辑
我是python的新手,可能有一个超级基本的问题.我已经通过安装默认情况下包括python 3的anaconda安装了Jupyter Notebook.现在,我想使用仍可与python 2.7一起使用的外部工具箱,因此,我尝试按照建议
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
但是它说找不到命令"python2".有什么主意吗?
But it says that it couldn't find the command "python2". Any idea?
推荐答案
我遇到了同样的问题.您可以尝试从python2开始jupyter-notebook
I had the same issue. You can try starting jupyter-notebook
from python2
$ python2 /path/to/jupyter-notebook
在我的情况下,
运行python2 /usr/bin/jupyter-notebook
解决了该问题.
in my case running python2 /usr/bin/jupyter-notebook
fixed the issue.
shebang 就我而言
$ head -1 /usr/bin/jupyter-notebook
#!/usr/bin/python3.4
$
这篇关于Jupyter Notebook-安装python 2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!