Python解释器在PyCharm中没有显示任何东西 [英] Python Interpreter not showing anything in PyCharm

查看:588
本文介绍了Python解释器在PyCharm中没有显示任何东西的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我使用 PyCharm 已经有一段时间了,我知道如何设置环境等.出于某种原因,我似乎无法访问我拥有的 Python 解释器(见图).

So, I've used PyCharm for quite a while and I know how to set environments, etc. For some reason, I can't seem to access the Python interpreters that I've got (see image).

当我在 Clion 中打开同一个项目时,我可以运行文件并且可以看到解释器.

When I open the same project in Clion I am able to run the files and I can see the interpreters.

  1. 在 Clion 中运行以查看解释器是否卡住".

  1. Run in Clion to see if the interpreter "sticks".

删除了 .idea 文件.

重新安装PyCharm.

推荐答案

通常Python Interpreter是Settings中Build, Execution, Deployment的子项.(在 PyCharm 2021 中,PyCharm 2019 中的布局略有不同.

Usually Python Interpreter is a sub-item of Build, Execution, Deployment in the Settings. (In PyCharm 2021, the layout in PyCharm 2019 was slightly different).

该项目单独显示的事实强烈暗示您安装了插件或出于某种原因在 LigthEdit 模式(如果您 使用命令行启动 IDE).如果您没有打开的项目,也可能发生这种情况(打开文件与打开项目不同,因此,使用 .idea 文件夹 - IDE 配置文件 会有所不同.)

The fact the item appears separately is a strong hint that you either installed a plugin or for some reason the IDE was opened in LigthEdit mode (this can easily happen if you launch the IDE using the command-line). This can also happen if you don't have an open project (having files open is not the same as opening a project, as such, with an .idea folder - the IDE configuration files will be different.)

让 IDE 处于 LightEdit 模式只能提供一组有限的功能,因此 IDE 不允许您以通常的方式配置解释器(其他设置对话框的行为也会与通常不同).

Having the IDE in LightEdit mode provides only a limited set of functionalities, so the IDE doesn't allow you to configure an Interpreter in the usual way (other setting dialogues will also behave different from usual).

解决方法是退出LightEdit模式,通过转到 File > OpenFile > 打开您以前的项目或新项目 新建项目.

The solution is to Exit the LightEdit mode, opening your previous project or a new one by going to File > Open or File > New Project.

这篇关于Python解释器在PyCharm中没有显示任何东西的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆