For historical reasons, Python is now mostly popular for around 2.5 versions and 3.0 later. In practice, we will also choose different versions, or switch versions at any time. Next I'll show you how to switch the Python version again in Pycharm
Tools/Materials
- Pycharm Software
- python3.3 and python2.7 two versions, and installed
Method/Step
- 1
Opening the software will see that there is a noticeable red hint error. The reason is that python3.3 is currently in use, and when print is executed, the printed text needs to be enclosed in parentheses ' () '.
- 2
Find this icon in the toolbar like a wrench and gear
- 3
Find the Project interpreter option on the left
- 4
Here you can see the Python version currently in use, select click the down arrow
- 5
The available Python and Jython versions are shown here, and Jython will load Python into the JVM for execution, which is generally much slower, so choose python2.7
- 6
Click Apply and OK
- 7
Now you can see that there are no red error prompts, and now Pycharm is using python2.7. Print no parentheses, and of course it's fine.
-
Python switch version