I have a Adafruit PWM hat and I am trying to run play around with some servos. However, when I run this line:
from adafruit_servokit import ServoKit
It returns:
No module named 'adafruit_circuitpython_servokit'
I have already run:
pip3 install adafruit-circuitpython-servokit
After running the above command, it states that all requirements have been satisfied so it doesn't seem as though I am missing any module. Any ideas on what the issue could be?
pip3
it should install to Python 3.7. – Richard Wessels Aug 04 '19 at 14:36python3
instead ofsudo python3
worked. I installed the module without the sudo command. Does this mean that the module is not accessible when running the program as root? – Richard Wessels Aug 04 '19 at 14:42board
. The program doesn't break when running the program without sudo. However, nothing happens with a servo I connected to channel 0. I assume you need to run the program in root for it to change. – Richard Wessels Aug 04 '19 at 14:58sudo pip3
. At first I installed the module as a regular user (no sudo). I heard that installing modules as root isn't the best idea, however, if you are having module errors when running the code as root, just reinstall the modules as root. – Richard Wessels Aug 05 '19 at 09:46