PyCharm错误:找不到指定文件python.exe

PyCharm错误:找不到指定文件python.exe

1、问题

系统提示找不到指定的文件:Error running 'hello': Cannot run program "B:\pystudy\venv\Scripts\python.exe" (in directory "\python-study"): CreateProcess error=2, 系统找不到指定的文件。

 

 

2、原因

原来的工程目录(C盘)下,保存了python的编译环境,包括python.exe文件。工程目录移动到E盘以后,工程设置中找不到python.exe程序,因此报错,需要修改设置。

 

3、解决

(1)打开菜单File - Setting

 

 

(2)找到 Project - Project Interpreter,再选择显示全部

 

(3)先删除旧的程序位置,OK ->OK,退到代码页

 

 

(4)会自动提示配置

 

(5)选择Add Interpreter

 

(6)查看项目目录是否正确,OK

 

posted @ 2020-11-24 11:40  淇凌  阅读(977)  评论(0编辑  收藏  举报