Closed Ragooman closed 6 years ago
I was able to resolve this problem with help from the admin on the Adafruit forum, here's the link to the results https://forums.adafruit.com/viewtopic.php?f=50&t=131286&p=653870#p653870
Yep make sure to install into the right python version--it can be tricky sometimes with both python 2 and 3 installed. If in doubt always run pip3 to install for python3 and pip2 to install for python2 (or just python
if you aren't sure which version you have, it's probably 2.x right now).
I have both Python 2.7.9 and Python 3.6.1 installed on my RPi2. I'm using the MPC3008 interfaced to the hardware port for SPI. And I use the example program from Adafruit_Python_MPC3008 library called "simpletest.py". This works perfectly when I use Python 2.7.9.
However, when I try using Python 3.6.1, I get this error message ModuleNotFoundError: No Module named 'Adafruit_GPIO' As I mentioned, I'm using the hardware port for the SPI. So I followed the instructions to uncomment those steps and comment out the steps for the software port.
I installed the MPC3008 library using the instructions from this homepage on github https://github.com/adafruit/Adafruit_Python_MCP3008 And I installed the GPIO library using the instructions from your homepage here on github. https://github.com/adafruit/Adafruit_Python_GPIO
Unless I'm mistaken, I couldn't find any solutions to this problem in the previous issues. I'm trying to merge this example code into my new project, but I'm using Python3 with networking code. And I like to remain with this version.
below is the code showing what I did