brendan-w / python-OBD

OBD-II serial module for reading engine data
GNU General Public License v2.0
1.07k stars 373 forks source link

Import error #130

Closed Stenymo closed 5 years ago

Stenymo commented 5 years ago

after running pip install obd on my raspberry pi and running import obd in python shell I get the following error:

Python 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516] on linux Type "copyright", "credits" or "license()" for more information.

import obd Traceback (most recent call last): File "<pyshell#0>", line 1, in import obd ImportError: No module named 'obd'

It seems to put the files in Python 2.7 instead of Python 3.5. Is there something I need to do?

alistair23 commented 5 years ago

Did you try pip3 install?

Stenymo commented 5 years ago

Just did and it did work but now getting: [obd.obd] No OBD-II adapters found [obd.obd] Cannot load commands: No connection to car Traceback (most recent call last): File "/home/pi/SmartCarTest.py", line 56, in connection.watch(obd.commands.SPEED, callback=get_speed) AttributeError: 'OBD' object has no attribute 'watch'

and as you can tell I am not connected to an adaptor. If I need to be connected to the adaptor for the watch attribute to work then I will try that. Thank you for your help and assistance.