Python 2 and Python 3 can coexist in Windows.
I have been using python2, from python 2.3 to python 2.7.6. To learn new features of python3, I installed python3.3.3. I found it quite convenient. Python versions coexist independently and do not conflict with each other. The following describes how to perform the operation:
1. Install python2.7.6 and python3.3.3 on your own.
2. Modify the Registry: Open-> regedit
Default Value of HKEY_CLASSES_ROOT \ Python. File \ shell \ open \ command
Change to "C: \ Python27 \ python.exe" "% 1" % * (C: \ Python27 is the installation path of my Python2.7 ),
Add C: \ Python27 \ and C: \ Python27 \ Scripts \ to the environment variable.
3. Create a python33.bat file in C: \ Python27 \ and run the file.
Copy codeThe Code is as follows:
@ Echo off
C: \ Python33 \ python.exe % *
Effect:
If I want to use python2.7.6, input python27. If I want to use python3.3.3, input python33.
Copy codeThe Code is as follows:
D: \ Python> python27 2to3Test. py
Hello, World!
D: \ Python> python33 2to3Test. py
Hello, World!
It is quite convenient.