Pycharm因版本切换运行报错:No Python at ‘C:\Users\HP\AppData\Local\Programs\Python\Python39\python.exe‘

文章目录

  • 一:问题场景 / 分析
  • 二:问题分析
  • 三:解决思路

一:问题场景 / 分析

原本用的Python 3,.9 pip 命令存在问题,又换了Python 3.6
查看python路径有两个
C:\Users\HP>where python
D:\DEV\python36\python.exe
C:\Users\HP\AppData\Local\Microsoft\WindowsApps\python.exe
异常报错信息
	E:\WorkContent\Shanghaikaida\Scripts\python.exe "D:/DEV/IdeaTools/Pycharm-professional/PyCharm 2022.3.3/plugins/python/helpers/pydev/pydevd.py" --multiprocess --qt-support=auto --client 127.0.0.1 --port 60888 --file E:\WorkContent\Shanghaikaida\田晨阳-信号处理\IIRtest.py 
No Python at 'C:\Users\HP\AppData\Local\Programs\Python\Python39\python.exe'

Process finished with exit code 103

Pycharm因版本切换运行报错:No Python at ‘C:\Users\HP\AppData\Local\Programs\Python\Python39\python.exe‘_第1张图片

二:问题分析

旧项目可能还是关联老的环境变量,

三:解决思路

操作 pycharm
Setting > Project > Python Interpreter > Add Interpreter 点击Existing 配置 interpreter 选择新配置python.exe的路径
可以看到 package 相关模块出现 点击 apply 应用,再次运行可以看到运行成功

Pycharm因版本切换运行报错:No Python at ‘C:\Users\HP\AppData\Local\Programs\Python\Python39\python.exe‘_第2张图片
Pycharm因版本切换运行报错:No Python at ‘C:\Users\HP\AppData\Local\Programs\Python\Python39\python.exe‘_第3张图片
Pycharm因版本切换运行报错:No Python at ‘C:\Users\HP\AppData\Local\Programs\Python\Python39\python.exe‘_第4张图片
Pycharm因版本切换运行报错:No Python at ‘C:\Users\HP\AppData\Local\Programs\Python\Python39\python.exe‘_第5张图片
Pycharm因版本切换运行报错:No Python at ‘C:\Users\HP\AppData\Local\Programs\Python\Python39\python.exe‘_第6张图片
Pycharm因版本切换运行报错:No Python at ‘C:\Users\HP\AppData\Local\Programs\Python\Python39\python.exe‘_第7张图片

你可能感兴趣的:(python,pycharm,ide)