How to set the python version on the terminal?


As far as I understand the Python version that's run in the embedded terminal is the one set in the local enviroment, which is different than the one set for the project (the Python interpreter).

The thing is when I run python -v on my cmd (I am on Windows) it displays I am using the 2.7.12 version. However, when running the same command in the PyCharm terminal it's saying I am using the 3.5.2 version. Why is this happening?

How can I set the Python version used in the terminal?

PS: I have tried closing PyCharm in case it was loading the old paths but this issue keeps happening.

Comment actions Permalink

Just to make sure, when you say "embedded terminal", you mean Terminal, not Python Console, correct?

Comment actions Permalink

Preferences -> Tools -> Terminal doesn't have much configurability, so it is just getting your python from your PATH. You can fiddle with how Windows passes paths into applications such as PyCharm. Or, you can use the Python Console tab:

  • Lets you jump straight into Python
  • Uses the project interpreter
  • Has more configuration options
  • You can even use iPython by simply installing the ipython package

Good luck.


Please sign in to leave a comment.