sean-obrien / rpotter

Raspberry Potter - Use a wand to control the IoT (Internet of Things)
https://www.raspberrypotter.net/
MIT License
57 stars 51 forks source link

ImportError: No module named pigpio #6

Open starscr3am77 opened 7 years ago

starscr3am77 commented 7 years ago

Hi, I am trying to run this using python2.7 on a pi3. I have all of the dependencies installed. Followed all of the directions. When using the following code I get an import error for import pigpio.

  1. source ~/.profile
  2. workon cv
  3. sudo pigpiod
  4. sudo bcm2835-v4l2
  5. python2.7 rpotter.py

I've tried it in and out of the cv environment. Tried renaming the import to gpio and it still doesn't work. It appears gpio is installed correctly. Any ideas?

etiology commented 7 years ago

TLDR; Run this once you are in your virtual environment:

pip install pigpio

Info: It sounds like you haven't installed the python libraries. To see what you have installed in your python virtual environment first use your workon cv command to connect to it. Then type pip freeze. It will print the libraries you currently have in that environment.

An easy test to see if you have pigpio installed for python would be to start up a python console and try and import it:

Launch the console:

python

Try and import the library you want to check (pigpio in this case):

import pigpio