简体   繁体   English

在 PyCharmIDE 中运行 python 程序时出错

[英]error in running python program in PyCharmIDE

[Unable to create process using 'C:\Users\MY HP\AppData\Local\Programs\Python\Python310\python.exe "C:/Users/MY HP/PycharmProjects/helloworld/tbjsrton.py"'] [无法使用 'C:\Users\MY HP\AppData\Local\Programs\Python\Python310\python.exe "C:/Users/MY HP/PycharmProjects/helloworld/tbjsrton.py"' 创建进程]

whenever I try to run a python program in the PyCharm IDE it is showing this error.每当我尝试在 PyCharm IDE 中运行 python 程序时,它都会显示此错误。 I have installed the python10 files in the default folder recommended by the python setup.我已将 python10 文件安装在 python 设置推荐的默认文件夹中。

在此处输入图像描述

Make sure that you set the environmental variables of the python and create a virtual environment.确保设置 python 的环境变量并创建虚拟环境。 You can edit the configuration and the easy way to do it is by creating a new project and setting the environment as the following:您可以编辑配置,简单的方法是创建一个新项目并将环境设置如下: 在此处输入图像描述

or edit the configuration或编辑配置

在此处输入图像描述

or you can add an interpreter as the following或者您可以添加解释器,如下所示

在此处输入图像描述

To set the path of python, find environmental variables and add the path as the following:要设置 python 的路径,找到环境变量并添加路径如下:

在此处输入图像描述

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

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