简体   繁体   English

(IntelliJ IDEA)“为模块选择了无效的Python解释器”

[英](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文档。

  1. From the main menu, select File | 从主菜单中,选择文件| Project Structure (⌘;). 项目结构(⌘;)。
  2. Under the Project Settings section, select Modules. 在“项目设置”部分下,选择“模块”。
  3. Select the necessary module and click Dependencies. 选择必要的模块,然后单击“依赖关系”。
  4. 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.

相关问题 “选择了无效的 python 解释器”提示 vscode - "Invalid python interpreter selected" prompt vscode 如何使用 PyCharm 插件在 IntelliJ IDEA 中配置 Python 解释器? - How do I configure a Python interpreter in IntelliJ IDEA with the PyCharm plugin? 在intellij中以多语言(scala / java / python)模块设置python解释器 - Setting python interpreter in intellij in a multi language (scala/java/python) module 在intellij上打开python解释器 - Open python interpreter on intellij 在virtualenv中使用解释器时,IntelliJ IDEA 14无法识别Python内置类型 - IntelliJ IDEA 14 does not recognise Python built-in types when using interpreter in virtualenv 在PyCharm / IntelliJ IDEA12中的python模块中运行unittest? - Run unittest in a python module in PyCharm/IntelliJ IDEA12? Intellij IDEA的python插件问题 - Problems with python plugin for Intellij IDEA ModuleNotFoundError:IntelliJ IDEA 中没有名为“pytest”的模块 - ModuleNotFoundError: No module named 'pytest' in IntelliJ IDEA Intellij Idea:即使使用模块的代码正在运行,Python导入仍显示错误 - Intellij Idea: Python import showing error even when code using module is running 导入模块,但解释器无法识别该模块python中的功能 - Importing a module but the interpreter is not recognizing the function in that module python
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM