0
votes

Python interpreter throws the following error even though canmatrix module is installed:

ModuleNotFoundError: No module named 'canmatrix' 

I have installed a python package (https://github.com/ebroecker/canmatrix) from source with the following: sudo python3 ~/test/canmatrix/setup.py install --prefix=/home/user/.local

When I check sys.path, I see it is installed:

  • /home/user/.local/lib/python3.6/site-packages/canmatrix-0.post653.dev0+g861b926-py3.6.egg

  • /usr/local/lib/python3.6/dist-packages/canmatrix-0.post653.dev0+g861b926-py3.6.egg

However, when I try to import the canmatrix module with following:

from canmatrix.log import setup_logger, set_log_level

I get the following error:

ModuleNotFoundError: No module named 'canmatrix'

Can someone explain why the module is not found? I have changed the owner of both modules to user.

1

1 Answers

0
votes

Apparently all I had to do was to run the installation command from where the setup.py is located! Now it works.