How to set default PyCharm interpreter?

35,615

Solution 1

File | Default Settings | Project Interpreter.

This configuration sets the default interpreter for the new projects, note the Default Settings menu, it's not the same as File | Settings which sets options for the current project.

If there is no open project, you can access this menu from the Welcome Screen (Configure | Settings).

Please note that it affects Open Directory option. Once you open a directory with your files, a new project will be created with the default interpreter that you have configured using the above steps. New Project option will show you the list of configured interpreters in default order and you will have to choose which one to use. There is a related request to suggest the most frequently used interpreter first.

Solution 2

This has now changed in the newer versions of PyCharm (I've got 2018.2). It's now called Preferences for New Projects:

enter image description here

Solution 3

enter image description here

New PyCharm versions in Windows have moved the New Project Settings to a new location. See image.
Full navigation: File > Other Settings > Settings for New Projects > Project Interpreter.

Solution 4

I am using a Mac and I found that on the splash screen there were messages saying that one of the xml files in

/Library/Preferences/PyCharm2017.3/options/

could not be loaded. As a result a new one was created. When I looked at the files in this directory I found a number of the files were corrupted in some way and could not be viewed. I renamed all these to .OLD, restarted PyCharm and reset the defaults to the system interpreter in my case. This fixed my problem and PyCharm now defaults to the system interpreter.

Solution 5

This has now changed again on the latest version of PyCharm. It is now File > New Project Settings > Settings for New Projects

Screenshot

Share:
35,615
l0b0
Author by

l0b0

Author, The newline Guide to Bash Scripting (https://www.newline.co/courses/newline-guide-to-bash-scripting). Hobby (https://gitlab.com/victor-engmark) & work software developer.

Updated on September 13, 2021

Comments

  • l0b0
    l0b0 almost 3 years

    My PyCharm installation has two interpreters available:

    • Python 3.3.2 (/usr/bin/python3.3m)
    • Python 2.7.5 (/usr/bin/python2.7)

    Whenever I open a new project it sets the interpreter to Python 3. Since I work mostly with 2.7, this means in most cases I have to reconfigure it. How do I change it to use 2.7 by default for new projects?

    Update: After setting the default interpreter to Python 2.7.5 in File → Default Settings → Project Interpreter and removing the .idea/misc.xml file, the interpreter is now not set at all in misc.xml. Better than setting it to Python 3.3, but still...