Fail to install paho-mqtt python module using pip

#1

Hello,
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 setup.py 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/basecommand.py", line 215, in main File "/tmp/pip-build-oXZg05/pip/pip/commands/install.py", line 324, in run File "/tmp/pip-build-oXZg05/pip/pip/req/req_set.py", line 380, in prepare_files File "/tmp/pip-build-oXZg05/pip/pip/req/req_set.py", line 634, in _prepare_file File "/tmp/pip-build-oXZg05/pip/pip/req/req_set.py", line 129, in prep_for_dist File "/tmp/pip-build-oXZg05/pip/pip/req/req_install.py", line 439, in run_egg_info File "/tmp/pip-build-oXZg05/pip/pip/utils/__init__.py", line 707, in call_subprocess InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-Q5_vZE/paho-mqtt/

How can I fix this issue?
Thanks!

#2

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
#3

Hi,
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:.

#4

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

1 Like