Import error : 'No module named Adafruit_IO

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
User avatar
brubell
Learn User Page
 
Posts: 2010
Joined: Fri Jul 17, 2015 10:33 pm

Re: Import error : 'No module named Adafruit_IO

Post by brubell »

PJvG wrote:This is the result :

python3
Python 3.7.3 (default, Dec 20 2019, 18:57:59)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import Adafruit_IO
>>>
Looks like it has no import errors this time.

Could you try running `python3 temperature.py` again?

User avatar
AQman70
 
Posts: 7
Joined: Thu Jun 11, 2020 1:12 am

Re: Import error : 'No module named Adafruit_IO

Post by AQman70 »

It worked, not sure why, but I'll take that.

pi@raspberrypi:~ $ python3 temperature.py
18.812

Thank you so much for your help

User avatar
brubell
Learn User Page
 
Posts: 2010
Joined: Fri Jul 17, 2015 10:33 pm

Re: Import error : 'No module named Adafruit_IO

Post by brubell »

AQman70 wrote:It worked, not sure why, but I'll take that.

pi@raspberrypi:~ $ python3 temperature.py
18.812

Thank you so much for your help
You have two different Python installations installed - Python 2 and Python3. Adafruit IO was installed via pip3 install, which uses Python 3, so you can only run it by calling Python3

User avatar
PJvG
 
Posts: 5
Joined: Sun Jun 07, 2020 9:16 am

Re: Import error : 'No module named Adafruit_IO

Post by PJvG »

with python3 it works fine with command from the terminal.
tnx for the help ! , John

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”