Reputation: 213
PyCharm is a good IDE, but its code hinting is not so intelligent. For example, when I use it to write Python2 code (the setting of my interpreter path can tell PyCharm this), I type prin, which I want PyCharm to give me a hint of print, however, the first prompt is print(), which is a Python3 style of function print. Is there any setting in PyCharm that I can tell it not to give me Python3 prompt when I am writing Python2 code (and not to give me Python2 prompt when I am writing Python3 code)?
My PyCharm version is 2.7.1
Upvotes: 14
Views: 34564
Reputation: 1671
Perhaps, you should select python 2.x interpreter for the project (File Menu - Settings - Project - Project Interpreter).
Upvotes: 13
Reputation: 2933
Simply set the Python Interpreter from 3.x to 2.x as you want.
Steps of PyCharm Version: Community Edition 2016.3.2
You need to install the interpreter first.
Then go to File -> Settings -> Project:dev -> Project Interpreter -> Set Python 2.7
Now go to Run -> Edit Configuration -> and set python Interpreter 2.7 here as given in the snapshot below-
Upvotes: 5
Reputation: 1
Maybe this can help:
Run->Edit Configurations, Replace all Py3 to Py2
I use PyCharm 3.0.1
Upvotes: 0