运行 Python Fedora 上的 Jupyter 中的 2 和 3 Linux

Run Python 2 & 3 in Jupyter on Fedora Linux

我昨天全新安装了 Fedora 23。我按照 https://jupyter.readthedocs.org/en/latest/install.html 的说明安装了 Jupyter,这意味着我这样做了

pip install jupyter

运行 Python 2 似乎很有趣。我尝试按照此处的说明添加对 Python 3 内核的支持 which means I followed these instructions http://jupyter.cs.brynmawr.edu/hub/dblank/public/Jupyter%20Help.ipynb#1.4.2-Enable-Python-3-kernel.

我重启了服务器,打开了一个新的Python3笔记本,3秒后看着内核死掉了

对我来说很明显,在不使用 Anaconda 的情况下,Linux 上的 Jupyter 中 运行ning 2 & 3 的文档非常少。我们能否将其设为以 Fedora Linux 为中心的无 Anaconda 线程?

软呢帽 23,Python 2.7.10 / 3.4.3

感谢

I answered a similar question yesterday,但对于 Debian。以下是在 Digital Ocean 的一台新的 Fedora 23 机器上工作的。您需要安装 python-pippython-pip3,在 Python 的一个版本上安装 jupyter,然后为 Python 的另一个版本安装内核。首先,确保安装了这些依赖项:

dnf groupinstall 'Development Tools'
dnf install gcc-c++
dnf install rpm-build
dnf install python-devel
dnf install python3-devel

然后安装pippip3:

dnf install python-pip
dnf install python3-pip

然后,安装jupyter。我们将使用 python3 因为已经是 2016 年了!

pip3 install jupyter

为 python2 安装 ipykernel 包:

python2 -m pip install ipykernel
python2 -m ipykernel install

编辑:文档情况有所改善,您可能可以just follow the instructions here

我把这些说明放在 a handy script in this gist.

我还在一个public IP 上设置了a script that will run Jupyter for you on a cloud machine、打开和关闭端口8888 和运行。