Fail to install paho-mqtt python module using pip


As the title suggests, I’m trying to install the paho-mqtt python module, and it didn’t work. My hardware platform is the Omega2+ and I’m running the lastest firmware. I’ve installed python 2.7.13 and pip. When try to install paho-mqtt with the command pip install paho-mqtt, it fails with this error:
Command "python egg_info" failed with error code 1 in /tmp/pip-build-Q5_vZE/paho-mqtt/ Exception information: Traceback (most recent call last): File "/tmp/pip-build-oXZg05/pip/pip/", line 215, in main File "/tmp/pip-build-oXZg05/pip/pip/commands/", line 324, in run File "/tmp/pip-build-oXZg05/pip/pip/req/", line 380, in prepare_files File "/tmp/pip-build-oXZg05/pip/pip/req/", line 634, in _prepare_file File "/tmp/pip-build-oXZg05/pip/pip/req/", line 129, in prep_for_dist File "/tmp/pip-build-oXZg05/pip/pip/req/", line 439, in run_egg_info File "/tmp/pip-build-oXZg05/pip/pip/utils/", line 707, in call_subprocess InstallationError: Command "python egg_info" failed with error code 1 in /tmp/pip-build-Q5_vZE/paho-mqtt/

How can I fix this issue?


Hi @Microbob,

You should definitely take a look at the Onion documentation. It’s super helpful. They covered this error here:

It looks like all you need to do is:

pip install --upgrade setuptools

Let me know if this works! If it doesn’t, I can fire up the Omega we have in the office to test.

1 Like

After running the install command, everything worked! Sorry about not looking into the doc again, that must have been how I fixed the issue before in our first thread :sweat_smile:.


No worries @Microbob, I do it all the time. I’m happy we can figure it out!

1 Like