Azure/azure-iot-sdk-python

Libraries are not working when if it got listed in pip

georgethomas08 opened this issue · 3 comments

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

@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

@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.

Closing due to inactivity