1

I've already changed the default project interpreter in PyCharm under File | Default Settings | Project Interpreter to Python 3.6, but when I try to write variable annotations (e.g. int: x = 6) PyCharm complains that Python version 3.4 does not support variable annotations, as Python 3.4 was the former interpreter I was using.

How do I change the syntax check to that of Python 3.6? Or any other interpreter, for that matter.

1
  • 1
    While you set the default (which applies to new projects), you still need to set the project interpreter on existing projects. Settings -> Project -> Project Interpreter. Commented Feb 21, 2017 at 19:37

1 Answer 1

2

The default interpreter (and the default settings in general) apply on newly created projects, if you want to change an already created project settings you need to:

  1. File > Settings (or Ctrl+Alt+s as shortcut)> Project: > Project interpreter
  2. In the project interpreter dropdown list you can specify your interpreter by selecting the appropriate from the list
  3. In here you can even create a new virtual environment for your project by clicking on > Create VirtualEnv
Sign up to request clarification or add additional context in comments.

2 Comments

Thank you for your answer. I recently downloaded 2017.1 and that is working with the new syntax perfectly. Nevertheless, I tried this on the old before installing and it worked. Thanks!
Good to know mate :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.