Home >Backend Development >Python Tutorial >Detailed examples based on python2 basics
I am preparing to learn Python recently. Due to the difference in versions, I don’t know which one to learn. Many things are now based on python2, but python2 may stop around 2020, so I simply decided on two Put them all on!
First, download two python version files from the official website. There is nothing to say about this, just download it and install it after downloading.
My installation environment is 2003, and the python versions are 2.7.8 and 3.4.2 respectively. Other versions are similar.
The first is the installation of 2.7.8. When installing, remember to add the environment variables and continue to the next step. Finish.
The second is the installation of 3.4.2. The same operation, sparks and lightning all the way are the default. Remember to add environment variables as well.
After the installation is complete, remember to check whether the environment variables have been added.
Right-click My Computer-Properties-Advanced-Environment Variables (similar to each system), copy it to see the following content, remember to add the previous C:\python27\Scripts; click Save, this path is your python installation path.
Now we open the python3 directory
Rename the python.exe inside Try opening cmd for python3.exe
at this time. The command for python2 is python. For python3, just enter python3
directly. That’s it!
Life is short, I use PYTHON!
The above is the detailed content of Detailed examples based on python2 basics. For more information, please follow other related articles on the PHP Chinese website!