简体   繁体   English

如何在linux下使用anaconda安装多个ipython 3.0内核(python 2.7,python 3.4等...)?

[英]How to install multiple ipython 3.0 kernels (python 2.7, python 3.4, etc…) with anaconda under linux?

Ipython 3.0 (Jupyter) allows to choose which kernel (python 2.7, python 3.4, etc...) to use when creating a new ipython notebook. Ipython 3.0(Jupyter)允许选择在创建新的ipython笔记本时使用哪个内核(python 2.7,python 3.4等)。 How can I install multiple ipython notebook kernels under Continuum Anaconda? 如何在Continuum Anaconda下安装多个ipython笔记本内核?

You'll want to make separate conda environments for Python 2 and 3 (see info elsewhere on how to do this), with IPython installed in both of them. 您将要为Python 2和3制作单独的conda环境(请参阅其他有关如何执行此操作的信息),并在其中安装了IPython。 Then, in each environment, run: 然后,在每个环境中运行:

ipython kernelspec install-self

This registers that kernel so IPython can see it from outside the environment. 这会注册该内核,以便IPython可以从环境外部看到它。

If you want more kernelspecs for different environments, look at the files in ~/.ipython/kernels to see how to describe them. 如果您需要针对不同环境的更多内核规范,请查看~/.ipython/kernels中的文件以了解如何描述它们。

install-self is being deprecated: https://github.com/jupyter/jupyter/issues/23 install-self已被弃用: https//github.com/jupyter/jupyter/issues/23

install-self
    [DEPRECATED] Install the IPython kernel spec directory for this Python.

Try 尝试

python -m ipykernel install --user --display-name "Python (current_env)"
source activate myenv
python -m ipykernel install --user --name myenv --display-name "Python (myenv)"

instead. 代替。

Reference: http://ipython.readthedocs.org/en/stable/install/kernel_install.html 参考: http//ipython.readthedocs.org/en/stable/install/kernel_install.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Ubuntu Linux上将pymssql安装到Python 3.4而非2.7? - How to install pymssql to Python 3.4 rather than 2.7 on Ubuntu Linux? 如何安装:OSX上的Anaconda(Python)3.4上的Quandl - How to install: Quandl on Anaconda (Python) 3.4 on OSX 如何在Anaconda 2.0中使用Python 3.4激活Ipython Notebook和QT Console - How to activate Ipython Notebook and QT Console with Python 3.4 in Anaconda 2.0 anaconda 在 Windows 上安装 python 3.4 - anaconda install python 3.4 on windows 如何在已经安装 python3.8 的 anaconda 下安装 python2.7 包? - How do I install python2.7 packages under anaconda with python3.8 already in place? 为 python 2.7 而不是 3.4 安装 numpy - Install numpy for python 2.7 and not 3.4 如何从Python脚本管理多个IPython / Jupyter内核并与之通信? - How to manage and communicate with multiple IPython/Jupyter kernels from a Python script? 在 iPython/Jupyter Notebooks 中安装多个 Python 3 内核 - Installing multiple Python 3 kernels in iPython/Jupyter Notebooks 在Linux中,如何为python 2.7而不是python 3安装pytesseract? - In linux, how to install pytesseract for python 2.7, not for python 3? 在ubuntu上为python 3.4安装带有Anaconda的opencv - Install opencv with Anaconda for python 3.4 on ubuntu
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM