People who know Python know that Python has 2.x and 3.x versions, and python3.x versions are not backwards compatible, but depending on the specific needs, sometimes 2.x and 3.x coexist, Python coexistence itself is not a problem, just need to set some environment variables and modify something to make it easier to use. This article mainly describes the Windows environment,
Method/Step
First of all, of course, install the two different versions of Python you need, here I install 2.7 and 3.3, two versions of the installation sequence does not matter.
The next step is to check the environment variables, the missing we need to add. Find the location of the environment variable first.
1.c:\python27
2.c:\python27\scripts
3.c:\ Python33
4.c:\python33\scripts
less which one, pay attention to semicolons separated.
Then go to the Python2.7 installation directory to find the content and remove the Python.exe.
Then enter the python3.3 installation directory. Find the Python.exe program and rename it to Python3.exe
finally open the command-line interface to test it. Executing the python2 command enters the python2.7 interactive environment, and executing the PYTHON3 command enters the python3.3 interactive environment.
The rest of the problem is the PIP problem. Two Python versions install the PIP to differentiate them later. Go to the Python installation path find the Scripts folder, go inside to find pip*-script.py, open modify the first sentence for the Python interpreter you want to specify
- orThe workaround used is to use the binary file editing tool to modify the "Pip.exe",
Reference: Http://stackoverflow.com/questions/24627525/fatal-error-in-launcher-unable-to-create-process-using-c-program-files-x86
Open with Hedit, then search for "C: \", find the corresponding location, then change the drive letter to "D", save, and then execute the "pip" command is OK.
The "D:\Python27\Scripts" directory has a number of files are present in this situation, the right to change it.
====================== Document Information ======================
Source: http://blog.csdn.net/testcs_dn/article/details/54176504
Null
Multiple Python versions under Windows coexist