After spending whole afternoon trying to get the latest version of Azure IoT Edge Hub Dev Tools (iotedgehubdev) running on my M1 MacBook, I felt kinda obligated to share it here and save someone else's afternoon.
My Environment is following:
- Apple Silicon M1 MacBook running Ventura
- Apple Pre-Installed Python3 version 3.10.4 (or probably with XCode Tools)
- Latest version of iotedgehubdev package (as of writing the post) is 0.18.14
I was too naive thinking that by using existing pip installer to simply install the iotedgehubdev package, the work would be done like shown in the installation instructions on github page of the project:
pip install --upgrade iotedgehubdev
And for the moment it looked like everything is fine and installed until I have figured out that the version of the iotedgehubdev binary is 0.11.1! Which is more then 3 years old release!
It turns out that the only way to get the latest version of iotedgehubdev package on the MacOS is to do following steps:
1. Install Python 3.9
Use Homebrew to install Python 3.9 as this is the latest Python release supported by iotedgehubdev:
brew install firstname.lastname@example.org
2. Use pip3.9
After that, use newly installed pip3.9 to install iotedgehubdev package:
pip3.9 install iotedgehubdev
Now, you do get the latest version of the iotedgehubdev package, but if you try to run the binary, you will be confronted with following exception indicated the version mismatch or breaking changes in OpenSSL package:
AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms'
To solve that, you will need to continue with Step 3.
3. Update pip3.9 and PyOpenSSL
Execute following commands to update the pip3.9 and PyOpenSSL:
pip3.9 install --upgrade pip pip3.9 install --upgrade pyOpenSSL
Now you should be having a running latest version iotedgehubdev binary!