Simultaneous installation of Python2 and Python3 to make it coexist

Source: Internet
Author: User

pip image installation:PIP Install * * * * https://pypi.douban.com/simple
  1. Install Python2 First, then remember the installation location (you can also specify the installation directory, my installation directory is: D:\software\python2)
  2. Change the installed Python.exe to Python2.exe (under: D:\software\python2)
  3. Then run at the command line: Python2, if there is a return to indicate that the installation is successful; error may be the installation failed or the environment variable is not configured, the environment variable is configured well
  4. After installation, if PIP is installed together, the files in the directory where PIP will be installed are deleted (mine is in D:\software\python2\Scripts)
  5. Then download the PIP installation package on GitHub, unzip it and run it in the unpacked directory: Python2 setup.py Install
  6. Back to D:\software\python2\Scripts, you will find that PIP has been installed, and finally delete the Pip.exe file, leaving only Pip2.exe and Pip2.7.exe on it (to differentiate Python3 pip3 behind)
  7. Then execute at the command line: PIP2 to see if the installation is correct
  8. Next install Python3, install it in the Python3 directory (my is D:\software\python3)
  9. Change the installed Python.exe to Python3.exe (under: D:\software\python2)
  10. Then run at the command line: Python3, if there is a return to indicate that the installation is successful; error may be the installation failed or the environment variable is not configured, the environment variable is configured well
  11. After installation, if PIP is installed together, the files in the directory where PIP will be installed are deleted (mine is in D:\software\python3\Scripts )
  12. Run in Unzip directory: Python3 setup.py Install
  13. Back to D:\software\python3\Scripts, you will find that PIP has been installed, and finally the Pip.exe file will be deleted, leaving only Pip3.exe and Pip3.5.exe.
  14. This allows both Python2 and python3 to be present on the computer, as well as using PIP2 or PIP3 to install a different dependency package

Simultaneous installation of Python2 and Python3 to make it coexist

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.