14

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

4
  • 1
    Probably a regression of youtrack.jetbrains.com/issue/PY-1275. Commented Apr 6, 2013 at 6:05
  • Maybe this is just something where PyCharm is not so perfect. I begin to put up with this problem, to see whether PyCharm can be improved in the future. Commented Apr 6, 2013 at 9:35
  • 2
    It's just a bug that will be fixed, we've reopened PY-1275, please follow it for updates. Commented Apr 6, 2013 at 9:38
  • THX~Looking forward to its being fixed. Commented Apr 6, 2013 at 12:11

3 Answers 3

13

Perhaps, you should select python 2.x interpreter for the project (File Menu - Settings - Project - Project Interpreter).

Sign up to request clarification or add additional context in comments.

2 Comments

THX~ The Project Interpreter has already been set as python 2.7, but this problem stays the same.
I have been got the same problem. By default I work with python 3.4, but, for a specific job I need the Python 2.7. I set in pycharm, but it keeps loading the 3.4 interpreter. Any idea?
5

Simply set the Python Interpreter from 3.x to 2.x as you want.

Steps of PyCharm Version: Community Edition 2016.3.2

  1. You need to install the interpreter first.

  2. Then go to File -> Settings -> Project:dev -> Project Interpreter -> Set Python 2.7 enter image description here

  3. Now go to Run -> Edit Configuration -> and set python Interpreter 2.7 here as given in the snapshot below- Python Interpreter 2.7

Comments

0

Maybe this can help:

Run->Edit Configurations, Replace all Py3 to Py2

I use PyCharm 3.0.1

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.