简体   繁体   English

为 IntelliJ IDEA 社区版安装 Python 3 插件

[英]Installing Python 3 Plugin for IntelliJ IDEA Community Edition

I'm running the latest version of IntelliJ IDEA Community Edition and have Python 3.7 downloaded and installed.我正在运行最新版本的 IntelliJ IDEA 社区版并下载并安装了 Python 3.7。 The trouble is, my console with IntelliJ is only running Python 2.7.问题是,我的 IntelliJ 控制台只运行 Python 2.7。 I've tried installing/uninstalling/updating installation but the only Plug-in option with IntelliJ is Community Edition and this seems to be Python 2 .. anyway.我试过安装/卸载/更新安装,但 IntelliJ 的唯一插件选项是社区版,这似乎是 Python 2 .. 无论如何。 How am I able to load Python plug-in (if there is one) for IntelliJ?我如何能够为 IntelliJ 加载 Python 插件(如果有)? I'm not able to import Pandas as a result and can't work through code ..结果我无法导入 Pandas 并且无法通过代码工作..

Don't want to go through the route of copying and pasting modules from 3.7 to 2 if I don't need to or if it's going down a bad road so to speak.如果我不需要或者如果它走上一条糟糕的道路,我不想经历从 3.7 到 2 复制和粘贴模块的路线。

I've tried installing/uninstalling/updating installation but the only Plug-in option with IntelliJ is Community Edition and this seems to be Python 2 .. anyway.我试过安装/卸载/更新安装,但 IntelliJ 的唯一插件选项是社区版,这似乎是 Python 2 .. 无论如何。 How am I able to load Python plug-in (if there is one) for IntelliJ?我如何能够为 IntelliJ 加载 Python 插件(如果有)? I'm not able to import Pandas as a result and can't work through code ..结果我无法导入 Pandas 并且无法通过代码工作..

As described above .. can't load the plug-in如上所述..无法加载插件

error: module not found错误:找不到模块

Took me forever to find.. I have written the steps below :-花了我很久才找到..我写了以下步骤:-

  • Close project关闭项目
  • Configure配置
  • Structure for New Projects -> SDKs -> Packages新项目的结构 -> SDK -> 包
  • Click on Pygame -> Click install package Then at the end Create new project点击 Pygame -> 点击安装包然后最后创建新项目

Picture of where to find pygame.在哪里可以找到 pygame 的图片。

Please try these steps:请尝试以下步骤:

  1. Open "Project Structure | SDKs"打开“项目结构 | SDKs”
  2. Add new python SDK (choose"System Interpreter" and select installed Python 3 from the dropdpwn list)添加新的python SDK(选择“系统解释器”并从dropdpwn列表中选择已安装的Python 3)
  3. Open "Settings/Preferences | Build... | Console | Python Console" and select "Use specified interpreter"打开“设置/首选项 | 构建... | 控制台 | Python 控制台”并选择“使用指定的解释器”

After that "Tools | Python Console" will run with Python 3之后“工具 | Python 控制台”将与 Python 3 一起运行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM