无法在Jupyter笔记本中获取python3

时间:2015-08-19 17:44:30

标签: ipython ipython-notebook jupyter

如何让python3在Jupyter中运行?我也无法让它提供该内核。 当我在终端上运行ipython3 notebook时,我会检查Python的版本:

import sys
print(sys.version)

我得到输出:

3.4.0 (default, Jun 19 2015, 14:20:21) 
[GCC 4.8.2]

当我运行jupyter notebook时,我只能选择新的python 2笔记本和

import sys
print(sys.version)

我得到输出:

2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2]

我试着跑:

sudo ipython3 kernelspec install-self
[TerminalIPythonApp] WARNING | File not found: 'kernelspec'

1 个答案:

答案 0 :(得分:3)

我有同样的问题,但是通过使用Python3作为Python二进制文件制作virtualenv来解决它;安装iPython;并从virtualenv推出了iPython笔记本。我将测试以查看相同的过程是否适用于Jupyter(我希望它会)。请注意,当我这样做时,我只能选择制作Python 3笔记本。

以下步骤对我有用:

mkvirtualenv --python=/full/path/to/python3.5 p35
pip install jupyter
jupyter notebook

弹出一个网页,我被允许制作一个Python 3笔记本。

相关问题