Python Forum

Full Version: ModuleNotFoundError
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to run a code that works in another laptop but not sure why i am getting the following error message:

ModuleNotFoundError: No module named 'bresenham'

i googled this error and found that i needed to install:

pip install bresenham

but i am still getting the same error message.
Some tedious but necessary questions:

Do you have more than one version of python installed?
A separate version of pip comes with each version.

Are you running in a virtual environment?
And, if so has it been activated.

If all of the above is OK,
from command line

check python version: python -V
and then pip pip -V

do the versions match?

next make sure package shows in pip pip list

If you get this far, try running your script from the command line with python myscript.py, replacing myscript with your script name.

Do you get the same error?

last, did you use this command to install bresenham python -m pip install bresenham?
see GitHub page here: https://github.com/encukou/bresenham