PyCharm error: 'No Module' when trying to import own module (python script)

前端 未结 14 1844
醉话见心
醉话见心 2020-12-07 07:57

I have written a module (a file my_mod.py file residing in the folder my_module). Currently, I am working in the file cool_script.py t

14条回答
  •  天涯浪人
    2020-12-07 08:30

    What I tried is to source the location where my files are.

    e.g. E:\git_projects\My_project\__init__.py is my location.

    I went to File -> Setting -> Project:My_project -> Project Structure and added the content root to about mention place E:\git_projects\My_project

    it worked for me.

提交回复
热议问题