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…
解决方案
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.
今天的文章pycharm自带python解释器吗,如何设置默认PyCharm解释器?分享到此就结束了,感谢您的阅读,如果确实帮到您,您可以动动手指转发给其他人。
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/34029.html