简体   繁体   English

Python 虚拟环境中的 /venv/bin/python 文件夹丢失 Pycharm

[英]Python missing from /venv/bin/python folder in virtual environment Pycharm

I've recently migrated across to a new Mac computer and now when I try and run a Python file within a Pycharm virtual environment I get the message我最近迁移到一台新的 Mac 计算机,现在当我尝试在 Pycharm 虚拟环境中运行 Python 文件时,我收到消息

Cannot Run program {Virtual_Environment_name}/venv/bin/python in directory {Virtual_Environment_name}/venv/bin/python , error = 2, "No such file or directory"无法在目录{Virtual_Environment_name}/venv/bin/python bin/python 中运行程序{Virtual_Environment_name}/venv/bin/python /bin/python,错误 = 2,“没有这样的文件或目录”

It looks like Python is not installed in the folder {Virtual_Environment_name}/venv/bin/python .看起来 Python 没有安装在文件夹{Virtual_Environment_name}/venv/bin/python中。

How can I install Python at this location?如何在此位置安装 Python? Are my assumptions correct?我的假设是否正确?

At the right bottom corner, there's an interpreter selection button.在右下角,有一个解释器选择按钮。 Press it.按下。 Now you've got two options:现在你有两个选择:

  • Interpreter settings解释器设置
  • Add interpreter...添加解释器...

选择口译员

Choose Interpreter settings .选择Interpreter settings Your interpreter should be marked red, as it is not found.您的解释器应标记为红色,因为未找到。 Press the gear button at the right and ask to Show all... interpreters.按下右侧的gear button并要求Show all...口译员。 You may choose to edit your interpreter's path here, or remove the interpreter and make it anew.您可以选择在这里编辑解释器的路径,或者删除解释器并重新创建它。

要单击的按钮

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

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