WINDOWS10 Conda Python multi-version switching

Source: Internet
Author: User

Prior to learning to install the python2.7 is installed through the ANACONDA2

Now you want to swap with Python3 so look for versions and ways to switch back and forth

Open a command prompt, and remember that the command prompt is not win10 Windows PowerShell, and so will say the difference between the two

Enter the following directive (I chose the python3.6 version):

Conda Create--name py36 python=3.6

After installing the screen will prompt you activate py36 words

A folder named Py36 will appear in the anaconda/envs/directory. This is pyhon3.6 's location.

then enter

Conda Info--envs

Will print out

where root represents our previous default version of python2.7

Enter Activate Py36 (here, if you enter in Windows PowerShell, it will not work)

Will tell you that you have activated

Querying the current Python version python-v will show that the version has been successfully switched

But at this point, if you enter pip-v you will find that PIP is still a previous version of Python

What to do?

Go to the anaconda/envs/py36/script/directory.

Found two files add a number 3 or 36 all lines are used to differentiate

And then you have to configure the environment variables.

Add the directory where the Pip3.exe is located to the path.

At the command prompt, input pip corresponds to py27 pip input pip3 corresponding to py36 PIP3

When installing some packages for py36, Pip Intsall was used to install the PIP3 now.

Cut back to the original version using Avtivate root

WINDOWS10 Conda Python multi-version switching

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.