Detailed examples based on python2 basics

巴扎黑
Release: 2017-06-23 11:04:49
Original
1651 people have browsed it

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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!