Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

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.
Please be positive and constructive with your questions and comments.

Re: Import error : 'No module named Adafruit_IO

by brubell on Wed Jun 24, 2020 10:42 am

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?

brubell
 
Posts: 946
Joined: Fri Jul 17, 2015 10:33 pm

Re: Import error : 'No module named Adafruit_IO

by AQman70 on Wed Jun 24, 2020 7:00 pm

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

pi@raspberrypi:~ $ python3 temperature.py
18.812

Thank you so much for your help

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

Re: Import error : 'No module named Adafruit_IO

by brubell on Fri Jun 26, 2020 9:33 am

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

brubell
 
Posts: 946
Joined: Fri Jul 17, 2015 10:33 pm

Re: Import error : 'No module named Adafruit_IO

by PJvG on Fri Jun 26, 2020 11:24 am

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

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

Please be positive and constructive with your questions and comments.