I have an install script that I've been using (and I swear it worked before on another Pi), but whatever I've done, it appears I have a broken install of pip, and I'm not sure how to fix it.
I tried several packages (pymodbus, simplejson), and both produce the following errors:
pi@raspberrypi:~ $ sudo pip install pymodbus
Downloading/unpacking pymodbus
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 Error)
I tried reinstalling pip with sudo apt-get install --reinstall python-pip
(including purging & autoremove), and tried installing pip using sudo easy_install pip
; and tried using pip to upgrade itself (pip install -U pip
), but none of these things fixes the problem (and in fact the 3rd one throws the same error).
Does anybody have any ideas for me to try here? I feel like I'm missing something obvious, but can't put my finger on it.