From the past one week am facing ModuleNotFound error in Intellij for a python project even though the module is present. I tried several troubleshooting methods.
- I have added Absolute imports
- I have set the correct python interpreter
- Cleared the intelliJ cache and rebuilt the indexes.... still unable to get it fixed.
Please help me resolve this
CodePudding user response:
Have you checked if the path is in sys.path?
import sys
sys.path
If the path of the directory your module are missing there simply add it by using
sys.path.append('yourpath/')
Let me know if it worked
CodePudding user response:
Does it help to mark the folder as "Test Source Root"? Please feel free to submit a request at https://youtrack.jetbrains.com/issues/PY with a simplified project zipped attached and steps to reproduce.