I get a red highlight "no module named .." if I try to import a module from the same dir.
I have 2 modules into the same dir and I want to import one into another. I can run the script and use the imported module, but the IDE doesn't seem to see the module ('no module named ..message') and the autocomplete can't see the funcs inside it.
Thank you.
Please sign in to leave a comment.
In PyCharm's Project tool window, right-click on the directory and select Mark Directory As -> Sources Root.
The behaviour must have changed, didn't have to do this before. Is there a way to set this as a "default" setting?
Thank you so much.