The title really says it all. Files in my PYTHONPATH are not recognized when I run scripts (ModuleNotFoundError: No module named <some_module>), but they are when I open the interactive prompt in the command line. I'm running ubuntu 22.04. What could be causing this?
I had a similar problem that was caused by python cache directories in a parent directory of my script. I deleted them and now the path works as expected.
Pythonpath only recognized in interactive teminal