如何在 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) 允许选择在创建新 ipython 时使用哪个内核(python 2.7、python 3.4 等...)笔记本。如何在 Continuum Anaconda 下安装多个 ipython notebook 内核?
您需要为 Python 2 和 3 创建单独的 conda 环境(有关如何执行此操作的信息,请参阅其他地方的信息),并在两者中安装 IPython。然后,在每个环境中,运行:
ipython kernelspec install-self
这会注册该内核,因此 IPython 可以从环境外部看到它。
如果您想要更多针对不同环境的内核规范,请查看 ~/.ipython/kernels
中的文件以了解如何描述它们。
install-self 已弃用:https://github.com/jupyter/jupyter/issues/23
install-self
[DEPRECATED] Install the IPython kernel spec directory for this Python.
尝试
python -m ipykernel install --user --display-name "Python (current_env)"
source activate myenv
python -m ipykernel install --user --name myenv --display-name "Python (myenv)"
相反。
参考:http://ipython.readthedocs.org/en/stable/install/kernel_install.html
Ipython 3.0 (Jupyter) 允许选择在创建新 ipython 时使用哪个内核(python 2.7、python 3.4 等...)笔记本。如何在 Continuum Anaconda 下安装多个 ipython notebook 内核?
您需要为 Python 2 和 3 创建单独的 conda 环境(有关如何执行此操作的信息,请参阅其他地方的信息),并在两者中安装 IPython。然后,在每个环境中,运行:
ipython kernelspec install-self
这会注册该内核,因此 IPython 可以从环境外部看到它。
如果您想要更多针对不同环境的内核规范,请查看 ~/.ipython/kernels
中的文件以了解如何描述它们。
install-self 已弃用:https://github.com/jupyter/jupyter/issues/23
install-self
[DEPRECATED] Install the IPython kernel spec directory for this Python.
尝试
python -m ipykernel install --user --display-name "Python (current_env)"
source activate myenv
python -m ipykernel install --user --name myenv --display-name "Python (myenv)"
相反。
参考:http://ipython.readthedocs.org/en/stable/install/kernel_install.html