I have a big Python 2 project that I want to port to Python 3. As per the porting guide I want to become Python 2/3 compatible first. This would mean writing Python 3 compatible code in Python 2. Is there a way to tell PyCharm to turn on Python 3 code checking in a Python 2 project?

1 Answer 1


I use the Python Community Edition extension in IDEA, currently version Open Settings. Under Editor -> Inspections find the section in the center pane for "Python" there is now a setting for "Code compatibility inspection" where you can choose the python versions to inspect.

I haven't looked lately but the PyCharm settings should be identical.

  • 2
    Instead of "Settings" it's "Preferences"
    – jcmack
    Oct 1, 2018 at 17:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .