Trying to get PyCharm to work, keep getting quot;No Python interpreter selectedquot;(试图让 PyCharm 工作,不断得到“没有选择 Python 解释器;)
问题描述
我正在尝试学习 Python,并决定使用 PyCharm.当我尝试开始一个新项目时,我得到一个对话框,上面写着没有选择 Python 解释器".它有一个选择解释器的下拉菜单,但下拉菜单是空的.
I'm trying to learn Python and decided to use PyCharm. When I try to start a new project I get a dialog that says "No Python interpreter selected". It has a drop down to select a interpreter, but the drop down is empty.
推荐答案
你的问题可能是你没有安装 python.这意味着,如果您使用的是 Windows,则您尚未下载 Windows 安装程序,您可以在 Python 官方网站上找到该安装程序.
Your problem probably is that you haven't installed python. Meaning that, if you are using Windows, you have not downloaded the installer for Windows, that you can find on the official Python website.
如果你有,PyCharm 很可能找不到你的 Python 安装,因为它不在默认位置,通常是 C:Python27 或 C:Python33(至少对我来说).
In case you have, chances are that PyCharm cannot find your Python installation because its not in the default location, which is usually C:Python27 or C:Python33 (for me at least).
所以,如果您已经安装了 Python,但仍然出现此错误,那么可能发生了两件事:
So, if you have installed Python and it still gives this error, then there can be two things that have happened:
- 您使用了
virtualenv并且该virtualenv已被删除或文件路径已更改.在这种情况下,您将不得不继续阅读此答案的下一部分. - 您的 python 安装不在其默认位置,在这种情况下,您需要找到它的位置,并找到
python.exe文件.
- You use a
virtualenvand thatvirtualenvhas been deleted or the filepath changed. In this case, you will have to find proceed to the next part of this answer. - Your python installation is not in its default place, in which case you will need to find its location, and locate the
python.exefile.
找到必要的二进制文件后,您需要告诉 PyCharm 要查看:
Once you have located the necessary binaries, you will need to tell PyCharm were to look:
- 打开设置对话框 CTRL + ALT + S
然后你需要在搜索框中输入
interpreter:
正如您在上面看到的,您需要转到Project Interpreter,然后转到Python Interpreter.已在上图中为您选择了位置.
As you can see above, you will need to go to Project Interpreter and then go to Python Interpreter. The location has been selected for you in the above image.
在旁边你会看到几个选项图标,点击大的+图标,然后点击local,因为你的解释器在这台电脑.
To the side you will see a couple of options as icons, click the big + icon, then click on local, because your interpreter is on this computer.
这将打开一个对话框.确保选择该目录的 python.exe 文件,不要给 pycharm 整个目录.它只需要解释器.
This will open up a dialogue box. Make sure to select the python.exe file of that directory, do not give pycharm the whole directory. It just wants the interpreter.
这篇关于试图让 PyCharm 工作,不断得到“没有选择 Python 解释器";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:试图让 PyCharm 工作,不断得到“没有选择
基础教程推荐
- Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙? 2022-01-01
- PermissionError: pip 从 8.1.1 升级到 8.1.2 2022-01-01
- 包装空间模型 2022-01-01
- 在Python中从Azure BLOB存储中读取文件 2022-01-01
- 无法导入 Pytorch [WinError 126] 找不到指定的模块 2022-01-01
- PANDA VALUE_COUNTS包含GROUP BY之前的所有值 2022-01-01
- 修改列表中的数据帧不起作用 2022-01-01
- 使用大型矩阵时禁止 Pycharm 输出中的自动换行符 2022-01-01
- 在同一图形上绘制Bokeh的烛台和音量条 2022-01-01
- 求两个直方图的卷积 2022-01-01
