如何将 python3 内核添加到 jupyter (IPython) [英] How do I add python3 kernel to jupyter (IPython)

查看:36
本文介绍了如何将 python3 内核添加到 jupyter (IPython)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 Jupyter 笔记本安装了 python 2 内核.我不理解为什么.我可能在安装时搞砸了一些事情.我已经安装了 python 3.如何将其添加到 Jupyter?这是使用 python3 -m install jupyter 安装并使用 jupyter notebook 在浏览器中打开的默认 Jupyter 的屏幕截图:

My Jupyter notebooks installed with python 2 kernel. I do not understand why. I might have messed something up when I did the install. I already have python 3 installed. How can I add it to Jupyter? Here's a screenshot of what the default Jupyter insalled with python3 -m install jupyter and opened in the browser with jupyter notebooklooks like:

推荐答案

这在 Ubuntu 16.04 上对我有用:

This worked for me on Ubuntu 16.04:

python2 -m pip install ipykernel
python2 -m ipykernel install --user

python3 -m pip install ipykernel
python3 -m ipykernel install --user

参考文档:
Python 2 和 3 的内核.安装 IPython 内核 - IPython 文档.

Reference to the documentation:
Kernels for Python 2 and 3. Installing the IPython kernel - IPython Docs.

这篇关于如何将 python3 内核添加到 jupyter (IPython)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆