IPython笔记本 - 卸载Anaconda3 for Anaconda后找不到python3 [英] IPython Notebook - python3 not found after uninstalling Anaconda3 for Anaconda

查看:363
本文介绍了IPython笔记本 - 卸载Anaconda3 for Anaconda后找不到python3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Python 3.4.3卸载了Anaconda 2.3,然后使用Python 2.7.10安装了相同的Anaconda版本。

I uninstalled Anaconda 2.3 with Python 3.4.3 and then installed the same Anaconda version with Python 2.7.10.

当我通过 $ ipython notebook示例Notebook.ipynb打开笔记本时,它会尝试使用python3内核与使用已安装的python2打开相反。当然我收到错误未找到python3内核

When I open a notebook via $ ipython notebook "Example Notebook.ipynb" it tries to use the python3 kernel as opposed to opening with the installed python2. Of course I get the error python3 kernel not found.

如何使用python2打开ipython笔记本核心?我试图卸载ipython和ipython笔记本,然后从我的用户目录中删除 .ipython .jupyter 以防万一这些文件夹中设置了任何默认值,然后重新安装。仍然会遇到同样的问题。

How can I get ipython notebooks to open with the python2 kernel? I've tried to uninstall ipython and ipython notebook, then delete .ipython and .jupyter from my user directory in case there were any defaults set in these folders, then reinstalled both. Still get the same problem.

任何帮助都将不胜感激

推荐答案

您可以相互安装几个python版本。只需创建另一个环境(用包名称替换我的所有包)。

You can install several python versions alongside each other. Just create another environment (replace "all my packages" with the names of the packages).

conda create --name mypy_27 python = 2.7

conda create --name mypy_34 python = 3.4

之后你可以激活环境输入

afterwards you can activate the environments by typing

source activate mypy_34

如果您这样做

conda install "all your packages"

在活动环境中安装所需的软件包。

you install the desired packages in the active environment.

你可以做很多更多

这篇关于IPython笔记本 - 卸载Anaconda3 for Anaconda后找不到python3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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