My PyCharm installation has two interpreters available:
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...
Configure a system interpreter To work with your Python code in PyCharm, you need to configure at least one interpreter. A system interpreter is the one that comes with your Python installation. You can use it solely for all Python scripts or take it as a base interpreter for Python virtual environments.
By default, the Python extension looks for and uses the first Python interpreter it finds in the system path. To select a specific environment, use the Python: Select Interpreter command from the Command Palette (Ctrl+Shift+P).
IDE settings are stored in the dedicated directories under PyCharm home directory. The PyCharm directory name is composed of the product name and version.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With