[英](IntelliJ IDEA) “invalid Python interpreter selected for the module”
I'm a fairly new programmer, and I've been following courses and stuff to learn Python. 我是一个相当新的程序员,并且一直在学习课程和学习Python的知识。
I am used to developing small projects using IntelliJ IDEA and Python 3.6, but recently I tried downloading Anaconda and its modules so I could try some Machine Learning courses. 我曾经使用IntelliJ IDEA和Python 3.6开发小型项目,但最近我尝试下载Anaconda及其模块,因此可以尝试一些机器学习课程。 (I can use all of Anaconda's modules (Spyder, Jupyter Notebook, Anaconda Prompt,...)
(我可以使用Anaconda的所有模块(Spyder,Jupyter Notebook,Anaconda Prompt等)。
But for some reason, that installation seem to have messed up with my IntelliJ IDEA configuration, the main problem being that it can't find a proper interpreter or SDK for some reason. 但是由于某种原因,该安装似乎已经弄乱了我的IntelliJ IDEA配置,主要问题是由于某种原因而找不到合适的解释器或SDK。
I've been to JetBrains Help page, but I can't seem to get it working, my understanding about IDE's, interpreters, SDK and all that being quite limited... 我去过JetBrains帮助页面,但是我似乎无法正常工作,我对IDE,解释器,SDK以及所有这些方面的了解都非常有限。
Is there a problem of compatibility between Anaconda and that particular IDE? Anaconda与该特定IDE之间存在兼容性问题吗? Is there an easy way to find and set correctly the interpreter and/or SDK??
有没有一种简单的方法可以找到并正确设置解释器和/或SDK?
For your time, thank you 在您的时间里,谢谢
IntelliJ docs about how to Change module SDK . 有关如何更改模块SDK的 IntelliJ文档。
- From the main menu, select File |
从主菜单中,选择文件| Project Structure (⌘;).
项目结构(⌘;)。
- Under the Project Settings section, select Modules.
在“项目设置”部分下,选择“模块”。
- Select the necessary module and click Dependencies.
选择必要的模块,然后单击“依赖关系”。
- From the Module SDK list, select another SDK or SDK version you want to use.
从“模块SDK”列表中,选择要使用的另一个SDK或SDK版本。
No compatibility issue. 没有兼容性问题。 Go to
去
file->settings-> project: my project-> project interpreter
. 。 On the right hand side, press the "gear" icon, select "add local" and choose the specific version of python installation location,navigate to
python.exe
on your computer. 在右侧,按“齿轮”图标,选择“添加本地”,然后选择特定版本的python安装位置,然后在计算机上导航至
python.exe
。
OR 要么
'file-> Settings-> Project_interpreter->
click "gear" icon-> Press ADD
create virtual environment in particular empty folder.setup your base Interpreter with python.exe(python in linux).Import all global packages.Press OK. 在特定的空白文件夹中创建虚拟环境。使用python.exe(在Linux中为python)设置基本的解释器。导入所有全局软件包。按OK。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.