Problem with install Cayenne-MQTT-Python

Hi!!!

I have a RP3 and i am trying to install Cayenne-MQTT-Python
(Cayenne-MQTT-Python/README.rst at master · myDevicesIoT/Cayenne-MQTT-Python · GitHub)

but i get this error

(…)
Installed /usr/local/lib/python2.7/dist-packages/cayenne_mqtt-1.0.0-py2.7.egg
Processing dependencies for cayenne-mqtt==1.0.0
Searching for paho-mqtt
Reading Links for paho-mqtt
Download error on https://pypi.python.org/simple/paho-mqtt/: [Errno 104] Connection reset by peer – Some packages may not be found!
Couldn’t find index page for ‘paho-mqtt’ (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading Simple index
Download error on https://pypi.python.org/simple/: [Errno 104] Connection reset by peer – Some packages may not be found!
No local packages or download links found for paho-mqtt
error: Could not find suitable distribution for Requirement.parse(‘paho-mqtt’)
(…)

Any help?

Thank’s in advance

Hello, could you try with
sudo pip install paho-mqtt
sudo pip install cayenne-mqtt

I think if it could be a connectivity thing too based on the error messages. I just installed on a clean pi and it went OK, so it doesn’t look like their servers are down, though trying to browse those links on Python.org was sloooow.

It may be worth trying again in a bit later, or, if you have some other internet connection (maybe a phone to tether to, wifi, etc) to try again there to see if you have better luck.

Hi.

i have tried in the rpi 2 amnd rpi 3 and get the same result… FAIL

pi@rpi-2:~ $ pip install paho-mqtt
Downloading/unpacking paho-mqtt
Cleaning up…
Exception:
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/pip/basecommand.py”, line 122, in main
status = self.run(options, args)
File “/usr/lib/python2.7/dist-packages/pip/commands/install.py”, line 290, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File “/usr/lib/python2.7/dist-packages/pip/req.py”, line 1178, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File “/usr/lib/python2.7/dist-packages/pip/index.py”, line 194, in find_requirement
page = self._get_page(main_index_url, req)
File “/usr/lib/python2.7/dist-packages/pip/index.py”, line 568, in _get_page
session=self.session,
File “/usr/lib/python2.7/dist-packages/pip/index.py”, line 694, in get_page
req, link, “connection error: %s” % exc, url,
TypeError: str returned non-string (type SysCallError)

Storing debug log for failure in /home/pi/.pip/pip.log


/usr/bin/pip run on Wed Jun 14 20:44:26 2017
Downloading/unpacking paho-mqtt
Getting page Links for paho-mqtt
Cleaning up…
Exception:
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/pip/basecommand.py”, line 122, in main
status = self.run(options, args)
File “/usr/lib/python2.7/dist-packages/pip/commands/install.py”, line 290, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File “/usr/lib/python2.7/dist-packages/pip/req.py”, line 1178, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File “/usr/lib/python2.7/dist-packages/pip/index.py”, line 194, in find_requirement
page = self._get_page(main_index_url, req)
File “/usr/lib/python2.7/dist-packages/pip/index.py”, line 568, in _get_page
session=self.session,
File “/usr/lib/python2.7/dist-packages/pip/index.py”, line 694, in get_page
req, link, “connection error: %s” % exc, url,
TypeError: str returned non-string (type SysCallError)

Any idea?

Thank’s in advance

Hi.

i have tried in the rpi 2 amnd rpi 3 and get the same result… FAIL

pi@rpi-2:~ $ pip install paho-mqtt
Downloading/unpacking paho-mqtt
Cleaning up…
Exception:
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/pip/basecommand.py”, line 122, in
main
status = self.run(options, args)
File “/usr/lib/python2.7/dist-packages/pip/commands/install.py”, line
290, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle,
bundle=self.bundle)
File “/usr/lib/python2.7/dist-packages/pip/req.py”, line 1178, in
prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File “/usr/lib/python2.7/dist-packages/pip/index.py”, line 194, in
find_requirement
page = self._get_page(main_index_url, req)
File “/usr/lib/python2.7/dist-packages/pip/index.py”, line 568, in
_get_page
session=self.session,
File “/usr/lib/python2.7/dist-packages/pip/index.py”, line 694, in
get_page
req, link, “connection error: %s” % exc, url,
TypeError: str returned non-string (type SysCallError)

Storing debug log for failure in /home/pi/.pip/pip.log

Doing some googling on the error messages, it looks like it may be worth trying:

sudo python -m pip install --upgrade --force setuptools
sudo python -m pip install --upgrade --force pip

I should be clear that this is a 3rd party software we’re troubleshooting here, so I’m not super familiar with that error or those commands. Make backups if you have anything important on the Pi :slight_smile: The people on that project should be in a better position to offer troubleshooting with paho-mqtt.

If you’re at a dead end here, note that Cayenne-MQTT-Python can be installed without pip as well, with these commands:

git clone https://github.com/myDevicesIoT/Cayenne-MQTT-Python
cd Cayenne-MQTT-Python
python setup.py install