No Module found IOPi
The IO Pi Plus is a 32 channel MCP23017 GPIO expander for the Raspberry Pi
01/10/2018
Posted by:
Industratech
Hi
After the statement
from IOPi import IOPi
I get an error no module named IOPi
I have run the
sudo apt-get install python-smbus
which said it was already installed and updated.
Anything I am missing?
After the statement
from IOPi import IOPi
I get an error no module named IOPi
I have run the
sudo apt-get install python-smbus
which said it was already installed and updated.
Anything I am missing?
01/10/2018
Posted by:
andrew
Hi
It looks like your program is having trouble finding the IOPi.py library file.
You need to either put the IOPi.py file in the same directory as your python program or install the library into the python library folders using the instructions on IO Pi Python Library
It looks like your program is having trouble finding the IOPi.py library file.
You need to either put the IOPi.py file in the same directory as your python program or install the library into the python library folders using the instructions on IO Pi Python Library
02/10/2018
Posted by:
Industratech
Thanks a mill let me try this and will revert.
02/10/2018
Posted by:
Industratech
Where is the IOPi.py file usually kept on a standard sudo install?
02/10/2018
Posted by:
andrew
For Python 2.7 the files will normally be installed in /usr/local/lib/python2.7/dist-packages/IOPi
For Python 3 the files will be installed in /usr/local/lib/python3.4/dist-packages/IOPi or /usr/local/lib/python3.5/dist-packages/IOPi depending on which version of Python 3 is installed.
For Python 3 the files will be installed in /usr/local/lib/python3.4/dist-packages/IOPi or /usr/local/lib/python3.5/dist-packages/IOPi depending on which version of Python 3 is installed.
02/10/2018
Posted by:
Industratech
Ok the modules were not installed for some reason even though the sudo install stated they were. I downloaded with pip direct from github and now the folder is present in python 2.7
The IOPi when initialized in your program requires the IOPi expansion board plugged in as the I2C needs received data correct? As running the protocol without the board connected kick up a :
ioerror errno 5 input/output error
The IOPi when initialized in your program requires the IOPi expansion board plugged in as the I2C needs received data correct? As running the protocol without the board connected kick up a :
ioerror errno 5 input/output error
02/10/2018
Posted by:
andrew
The IO Pi does need to be plugged into the board otherwise it will throw an input/output error.
If you still get the error with the IO Pi installed then you will need to go through our I2C tutorial to make sure the I2C bus is installed and configured correctly.
If you still get the error with the IO Pi installed then you will need to go through our I2C tutorial to make sure the I2C bus is installed and configured correctly.
03/10/2018
Posted by:
Industratech
Thanks for the assistance all working 100%
Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.