问题描述:
Pycharm环境中运行脚本报错:
Error running 'serializers': Cannot run program "C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps\python.exe" (in directory "E:\django_restful\api"):

原因解析:
在IDE(Pycharm)中的python的地址错误,需要重新加载python版本。
解决方法:
1、打开File中Settings,找到Project Interpreter选项,在地址目录中会提示地址无效,点击Add添加按钮:

2、重新定位到python的路径,添加python路径,问题解决。


参考https://blog.youkuaiyun.com/qwxwaty/article/details/80711385

本文详细解析了在PyCharm环境中运行脚本时遇到的python路径错误问题,并提供了具体的解决步骤,包括如何正确设置Python解释器路径,以确保IDE能正确识别并使用Python环境。
447

被折叠的 条评论
为什么被折叠?



