PyCharm reporting it can't find module Follow
PyCharm seems to have trouble finding local modules. Python itself has no problem finding them and the program runs as expected.
In views.py
from lib.ome import func1, func2
I have the following directory structure. I have problems with local imports across the board, but right now views.py is reporting that it can't find functions in lib.ome. If I run the code, it runs without incident, but PyCharm highlights it red and says, "Unresolved reference XXXXXX"
Is there a way to manually help PyCharm find local modules?
Please sign in to leave a comment.
I had to change the project root. This particular code was located in a subdirectory beneath the PyCharm project root which was what was causing problems. Is there a way to manually edit this while maintaining a higher level project root?
Hello,
> Is there a way to manually edit this while maintaining a higher level project root?
not sure what you mean here. https://www.jetbrains.com/help/pycharm/configuring-project-structure.html please take a look at how to configure the project structure.