新建Python项目提示No Python interpreter configured for the project如何解决

用Pycharm编辑器新建python项目时提示No Python interpreter configured for the project的错误提示应该如何解决呢,这句英文翻译过来就是没有为Python项目配置解析器,导致这种错误的原因可能是没有配置环境变量,也可能是其它的误操作导致出现这个错误,解决方法也很简单。


一般这种错误在编辑器上面都会有提示,如图所示:

新建Python项目提示No Python interpreter configured for the project如何解决


我们点击编辑器上面的“No Python interpreter configured for the project”按钮,或者直接点击Setting按钮,找到Project Interpreter,如图所示:

新建Python项目提示No Python interpreter configured for the project如何解决


选择No interpreter右边的Add...按钮选择添加路径,接着选择对话框右边的Exsiting environment选项,如图所示:

新建Python项目提示No Python interpreter configured for the project如何解决

这里是解析器的路径,一般都在python的安装目录,打开Python的安装目录,找到Pythonw.exe,注意不是Python.exe,这里一定不要选错,不然还是会出现这个错误提示。


按照以上步骤操作,最后再点击OK按钮即可,再新建项目看看还有这个错误提示吗。