-
问题描述
如题,在VSCode中运行Python文件,以前是可以正常运行的一个文件,出现题中错误。
-
解决方案
-
步骤一:
参考3.
在lauch.json中,修改“env”。
"env": {"PYTHONPATH":"${workspaceRoot}"}
这里就涉及到如何打开lauch.json这个问题。
-
步骤二:
如上设置后,出现新的问题:
《The above line should NO LONGER be in your ~/.bashrc file! 》
在terminal的选择窗口中更改Shell。
Select dedault shell --> Command Prompt
如此,可以正常运行python文件
-
References
VSCode运行Python出现ImportError: Missing required dependencies ['numpy']
猜你喜欢
转载自blog.csdn.net/The_Time_Runner/article/details/105302435
今日推荐
周排行