简体   繁体   English

切换到蟒蛇的蟒蛇安装

[英]Switching to anaconda installation of python

I installed Python 2.7 on my computer awhile ago, and I believe I did not use Anaconda. 不久前,我在计算机上安装了Python 2.7,我相信我没有使用Anaconda。 I added Python 3.6 recently using an Anaconda environment, and am appreciating the benefits of using that. 我最近在Anaconda环境中添加了Python 3.6,并赞赏使用它的好处。 Is there a (somewhat) easy way to uninstall/reinstall Python 2.7 to be in the Anaconda environment as well so I can easily switch between them? 在Anaconda环境中是否也有一种(某种程度上)简便的方法来卸载/重新安装Python 2.7,因此我可以轻松地在它们之间进行切换?

Update -- if I create an environment for Python 2.7 by doing the following, and Python 2.7 is already on my computer, does this reinstall Python 2.7? 更新-如果通过执行以下操作为Python 2.7创建环境,并且我的计算机上已经安装了Python 2.7,是否可以重新安装Python 2.7?

$ conda create -n py2 python=2.7 anaconda

You can uninstall Python 2.7 from your computer (not necessary though). 您可以从计算机上卸载Python 2.7(虽然不是必需的)。 After you have done so, you can use Anaconda to create a Python 2.7 virtual environment. 完成此操作后,您可以使用Anaconda创建Python 2.7虚拟环境。 This will allow you easily switch between Python 2.7 and 3.6. 这将使您轻松地在Python 2.7和3.6之间切换。

To learn how you can create and manage virtual environments, check this site . 要了解如何创建和管理虚拟环境,请访问此站点

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM