python刚下没有解释器,pycharm没有看到python3.7解释器

I'm using Pycharm Community 2018.1.4 on Linux Mint 19 Tara Xfce.

It works well with Python 3.5 interpreter.

I installed Python 3.7 to be the default Python interpreter on the system.

python -V command returns Python 3.7.0b3

I would like to use Python 3.7 in Pycharm.

I've tried :

which python

/usr/bin/python

which python3.7

/usr/local/bin/python3.7

When I go to File > Settings > Project and Interpreter > Add and there is no /usr/local folder and there is no python3.7 in /usr/bin

I can cd to /usr/local/bin folder in the terminal, but Pycharm just can't.

I restarted, uninstalled/reinstalled Pycharm, refreshed its inner browser, restarted my pc. Nothing changed.

What am I missing?

解决方案

You will need to add the interpreter to the list of available interpreters.

Use which python to find out the path of the interpreter, then in the Settings > Project Interpreter > Add > System Interpreter window hit the "..." button and add that interpreter. (The screenshot below is from macOS, but it should be the same on Linux.)

e4633fccea6c326cc6a6e40bee6e81e3.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 在PyCharm中更换Python解释器是一项相对简单的操作,下面我将用300字向您详细解释。 首先,您需要确保已经安装了Python 3.7版本的解释器。如果您还没有安装,您可以从Python官方网站上下载并安装。 接下来,打开PyCharm,点击菜单栏中的「File」,然后选择「Settings」或者按下「Ctrl + Alt + S」来打开设置窗口。 在设置窗口中,到「Project Interpreter」选项,并点击它。在打开的窗口中,您将看到当前项目所使用的Python解释器。 点击解释器下拉菜单,在弹出的菜单中选择「Add」来添加一个新的Python解释器。 在弹出的窗口中,您将看到可用的解释器列表。点击右上角的「+」按钮,然后选择「System Interpreter」选项。 在弹出的对话框中,您可以到新安装的Python 3.7解释器的路径。选择该路径,然后点击「OK」按钮来确认选择。 回到设置窗口,您将看到新添加的Python解释器已经出现在解释器列表中。确保该解释器被选中,并点击「OK」按钮保存更改。 现在您已经成功更换了Python解释器。您可以在PyCharm中运行您的项目,并使用Python 3.7的特性和功能。请注意,这种更换不会影响到其他项目的Python解释器,每个项目都可以有自己的解释器设置。 希望以上解释对您有帮助。如果您还有其他疑问,请随时提问。 ### 回答2: 要在PyCharm项目中将3.6Python解释器更换为3.7Python解释器,可以按照以下步骤进行操作。 首先,打开PyCharm项目并进入项目设置。可以通过点击菜单栏中的“File”选项,然后选择“Settings”来打开项目设置。 在项目设置窗口中,到“Project Interpreter”选项。点击该选项后,在右侧的下拉菜单中,选择原本的3.6Python解释器。 接下来,在右侧的解释器列表中,到并选中原本的3.6Python解释器。然后,点击该解释器下方的“-”符号,将其从项目中移除。 然后,点击右上角的“+”符号,可以在弹出的菜单中选择“Add…”,以添加新的解释器。 在弹出的解释器列表中,选择3.7Python解释器。如果尚未安装3.7Python解释器,可以点击右侧的“Interpreter”按钮,然后选择并安装所需的3.7Python解释器版本。 选择3.7Python解释器后,点击“OK”按钮来确认选择。然后,PyCharm会自动下载并安装所选的解释器。 完成安装后,在项目设置窗口中,确保新安装的3.7Python解释器已被选中。然后,点击窗口底部的“OK”按钮,以保存并应用更改。 现在,PyCharm项目的Python解释器已经从3.6更换为3.7。可以在项目中使用新的解释器来运行和调试Python代码。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值