# Fail to install paho-mqtt python module using pip

**URL:** <https://forums.losant.com/t/fail-to-install-paho-mqtt-python-module-using-pip/593>\
**Category:** Help\
**Created:** [August 20, 2017, 3:00pm UTC](https://forums.losant.com/t/fail-to-install-paho-mqtt-python-module-using-pip/593 "2017-08-20T15:00:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Microbob](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/microbob/32/376_2.png) [@Microbob](https://forums.losant.com/u/Microbob)\
**Post date:** [August 20, 2017, 3:00pm UTC](https://forums.losant.com/t/fail-to-install-paho-mqtt-python-module-using-pip/593/1 "2017-08-20T15:00:27Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![anaptfox](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/anaptfox/32/873_2.png) [@anaptfox](https://forums.losant.com/u/anaptfox)\
**Post date:** [August 21, 2017, 3:00pm UTC](https://forums.losant.com/t/fail-to-install-paho-mqtt-python-module-using-pip/593/2 "2017-08-21T15:00:58Z")

</div>

Hi @Microbob,

You should definitely take a look at the [Onion documentation](https://onion.io/docs/). It’s super helpful. They covered this error here:

> **[Installing and Using Python | Onion Omega2 Documentation](https://docs.onion.io/omega2-docs/installing-and-using-python.html#fixing-the-setup-tools-issue)**
>
> Documentation for all things Onion and Onion Omega2.

It looks like all you need to do is:

```auto
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.

---

<div class="post-metadata">

**Author:** ![Microbob](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/microbob/32/376_2.png) [@Microbob](https://forums.losant.com/u/Microbob)\
**Post date:** [August 21, 2017, 4:05pm UTC](https://forums.losant.com/t/fail-to-install-paho-mqtt-python-module-using-pip/593/3 "2017-08-21T16:05:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anaptfox](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/anaptfox/32/873_2.png) [@anaptfox](https://forums.losant.com/u/anaptfox)\
**Post date:** [August 21, 2017, 4:24pm UTC](https://forums.losant.com/t/fail-to-install-paho-mqtt-python-module-using-pip/593/4 "2017-08-21T16:24:32Z")

</div>

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