Closed sebastianneubauer closed 1 year ago
I had to make a couple of changes in the codebase for another issue and as part of that change I have replaced the pip usage with mip. The necessary python code is pulled from this GitHub repo instead of from PyPi. It will install from the package.json file and installs the contents of the iotc folder along with umqtt library dependency. Adding the following code to your main program should perform the install.
# If your device needs wifi before running uncomment and adapt the code below as necessary
# import network
# wlan = network.WLAN(network.STA_IF)
# wlan.active(True)
# wlan.connect("SSID","password")
# while not wlan.isconnected():
# pass
# print(wlan.isconnected())
try:
import iotc
except:
import mip
mip.install('github:Azure/iot-central-micropython-client/package.json')
import iotc
As upip got replaced by mip it would be nice to have mip compatibility: https://github.com/orgs/micropython/discussions/9565