Whenever I am trying to import a module of my own making into my code, I get the 'Module not found' error. I've added all the necessary directories to pythonpath and marked them as Sourse roots, but pycharm gives me the same error, which i don't know how to solve. Here is my project structure:


And here is what happens when I try to run my code:


How do I fix this and what am I doing wrong?

Thank you for your help in advance!

1 comment
Comment actions Permalink


The error is given not by PyCharm, but by Python interpreter. Marking in source is only needed for code resolution in the editor and won't affect the execution.

Hint: You should avoid identical names for directories if they are part of the same project.


Please sign in to leave a comment.