Pycharm gets error “can't find '__main__' module”

后端 未结 7 694
轻奢々
轻奢々 2021-02-02 14:21

Whenever I try to run script via Virtualenv in pycharm, i get this error:

C:\\Users\\Costello\\PycharmProjects\\test\\venv\\Scripts\\python.exe C:/Users/Costello         


        
7条回答
  •  闹比i
    闹比i (楼主)
    2021-02-02 14:23

    I fixed it by removing values from Interpreter options field in run/debug configurations. While trying to add an interpreter, I had added the python path to the mentioned field.

    After clearing out the field all worked well.

    You can find run/debug configuration settings in the drop-down left of run icon on top-right of pycharm window.

提交回复
热议问题