在jupyter中选择python内核 [英] choose python kernel in jupyter
问题描述
我已经安装在Debian Jessie上:
Python2.7
Python3.5
我还通过 pip2
和 pip3
但是当我启动 jupyter-notebook
我只能使用python3作为内核!我使用Jupyter如何切换到pyhton2.7?
我在数字海洋中使用了一台新的Debian 8.5机器。
以root身份,从apt安装 pip
和 jupyter
,和开发包也是。
apt-get install python-py python-dev python3-pip python3-dev libzmq3
pip3安装jupyter
使用 ipykernel添加Python2的内核, / code>模块。已经安装了Python3内核。
pip install ipykernel
python2 -m ipykernel install
当您运行 jupyter笔记本
时,您应该同时拥有 Python 2
和 Python 3
列为可用内核。请注意,Tornado笔记本电脑服务器正在端口8888上提供HTTP,在许多机器上默认情况下不会打开。以下是
I have installed on Debian Jessie:
Python2.7
Python3.5
I have also installed Jupyter via pip2
and pip3
However when I launch jupyter-notebook
I can only use python3 as kernel! How can I switch to pyhton2.7 when using Jupyter?
I tried this with a fresh Debian 8.5 machine on Digital Ocean.
As root, install pip
and jupyter
from apt, and the development packages, too.
apt-get install python-pip python-dev python3-pip python3-dev libzmq3
pip3 install jupyter
Add the kernel for Python2 using the ipykernel
module. The Python3 kernel is installed, already.
pip install ipykernel
python2 -m ipykernel install
When you run jupyter notebook
, you should have both Python 2
and Python 3
listed as available kernels. Notice that the Tornado notebook server is serving HTTP on port 8888, which isn't opened by default on many machines. Here is a script that will run Jupyter for you, opening and closing port 8888 and running on a public IP.
这篇关于在jupyter中选择python内核的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!