import error: ‘No module named’ *does* exist

I set the PYTHONPATH to '.' and that solved it for me.

export PYTHONPATH='.'

For a one-liner you could as easily do:

PYTHONPATH='.' your_python_script

These commands are expected to be run in a terminal

Leave a Comment