Azure / azure-iot-sdk-python

A Python SDK for connecting devices to Microsoft Azure IoT services
MIT License
417 stars 374 forks source link

Libraries are not working when if it got listed in pip #1143

Closed georgethomas08 closed 1 year ago

georgethomas08 commented 1 year ago

Hi team,

Please find the SS below, the library was working fine all of a sudden it shows no module, I have uninstalled and reinstalled again but no chance, all other libraries are working fine except this

Screenshot from 2023-05-23 16-59-37

lev-i commented 1 year ago

@georgethomas08

It looks like you might be using V3 of the SDK instead of V2? V3 switches to from azure.iot.device import IoTHubSession instead of from azure.iot.device.aio import IoTHubDeviceClient.

The guide here has more info if you're interested, and the updated samples have some usage examples. If you want you can post the files and we can take a closer look.

lev-i commented 1 year ago

@georgethomas08

Never mind, took another look at this and realized I'd missed your version number. Your imports are also fine so it's not a problem with the files being run. Most likely cause is that when you're running pip list and python, the version of python being run is different than the version that's linked to pip.

Maybe try running them as pip3 and python3, or check that pip is linked with whatever python version you're running.

cartertinney commented 1 year ago

Closing due to inactivity