pycharm,p3.6运行错误:“ D:\ Python \ python.exe:在'D:/ Python projects / Projects'中找不到'__main__'模块

时间:2018-08-12 14:49:36

标签: python pycharm python-3.7

每当我单击在pycharm中运行时,它都会返回以下错误:

"D:\Python\python.exe: can't find '__main__' module in 'D:/Python projects/Projects'

Process finished with exit code 1"

以下图片是我的pycharm设置,请帮我!

img1 run error

img2 project interpreter setting

img3 project structure setting

img4 debugs configuration setting

1 个答案:

答案 0 :(得分:2)

我认为您必须在调试配置中将脚本路径设置为test1.py的路径(而不是“ Projects”文件夹)。