PyCharm 每次加载项目时都要求 python 解释器
PyCharm asks for python interpreter every time project is loaded
令人沮丧的是,每次我加载一个现有项目或创建一个新项目时,它都会抱怨没有选择解释器,我必须提供它的路径。
我的 python 安装没有什么异常,正如您所期望的那样,它位于 C:/Python27/ 中。它过去一直有效,但最近几周发生了一些变化。
我是 运行 Win7。 PATH 系统变量应该指向 C:/Python27/。
如果我破解打开命令行,python 命令会正常打开。
有什么想法吗?
设置 IDE 默认解释器解决了问题,正如 Vadim 提到的那样。找到有关如何执行此操作的说明 here。
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.
不完全确定为什么未设置默认值,但至少现在我可以重新设置它。项目默认设置也被遗忘了,这很好奇,但又是一个问题。
没有Default Settings
了,新版本的[=]叫Preferences for New Projects
27=](我的版本是2018.3.3).
为此,请转到:
File
> Preferences for New Projects
> Project Interpreter
在 Mac 上:文件 > 新项目的首选项。
您可以通过转至 文件 > 新项目设置 > 项目解释器轻松完成此操作:
令人沮丧的是,每次我加载一个现有项目或创建一个新项目时,它都会抱怨没有选择解释器,我必须提供它的路径。
我的 python 安装没有什么异常,正如您所期望的那样,它位于 C:/Python27/ 中。它过去一直有效,但最近几周发生了一些变化。
我是 运行 Win7。 PATH 系统变量应该指向 C:/Python27/。
如果我破解打开命令行,python 命令会正常打开。
有什么想法吗?
设置 IDE 默认解释器解决了问题,正如 Vadim 提到的那样。找到有关如何执行此操作的说明 here。
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.
不完全确定为什么未设置默认值,但至少现在我可以重新设置它。项目默认设置也被遗忘了,这很好奇,但又是一个问题。
没有Default Settings
了,新版本的[=]叫Preferences for New Projects
27=](我的版本是2018.3.3).
为此,请转到:
File
>Preferences for New Projects
>Project Interpreter
在 Mac 上:文件 > 新项目的首选项。
您可以通过转至 文件 > 新项目设置 > 项目解释器轻松完成此操作: