Error installing pip packages

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Error installing pip packages



I'm having a bit problem with pip, trying to install mopidy-Iris with command below:


sudo pip install Mopidy-Iris



This worked previously but after uninstall and reinstall I'm getting errors below:


Collecting Mopidy-Iris
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 353, in run
wb.build(autobuilding=True)
File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
require_hashes
File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 568, in _get_pages
page = self._get_page(location)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 792, in get_page
"Cache-Control": "max-age=600",
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 501, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 630, in send
history = [resp for resp in gen] if allow_redirects else
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 190, in resolve_redirects
**adapter_kwargs
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 609, in send
r = adapter.send(request, **kwargs)
File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py", line 47, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/adapters.py", line 423, in send
timeout=timeout
File "/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 643, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/lib/python2.7/dist-packages/urllib3/util/retry.py", line 315, in increment
total -= 1
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'



I've seen recommendation in running following to get it working but I'm getting exactly the same error as above by running the below:


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



Additional to above, i'm building this on Raspberry pi, which by running simple command like sudo apt-get update i get


Err:1 http://apt.mopidy.com jessie InRelease
Temporary failure resolving 'apt.mopidy.com'
Err:2 https://dev2day.de/pms jessie InRelease
Could not resolve host: dev2day.de
Err:3 http://archive.raspberrypi.org/debian stretch InRelease
Temporary failure resolving 'archive.raspberrypi.org'
Err:4 http://mirrordirector.raspbian.org/raspbian stretch InRelease
Temporary failure resolving 'mirrordirector.raspbian.org'
Reading package lists... Done
W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/stretch/InRelease Temporary failure resolving 'mirrordirector.raspbian.org'
W: Failed to fetch http://apt.mopidy.com/dists/jessie/InRelease Temporary failure resolving 'apt.mopidy.com'
W: Failed to fetch https://dev2day.de/pms/dists/jessie/InRelease Could not resolve host: dev2day.de
W: Failed to fetch http://archive.raspberrypi.org/debian/dists/stretch/InRelease Temporary failure resolving 'archive.raspberrypi.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.



Anyone might have seen this perhaps know what to do with it?





I think it's a problem with your pip version. Where does pip come from? How did you install it? Which version of pip do you use? Did you try to update pip?
– Thomas Sablik
Aug 12 at 23:31





If this is a pip version installed with ubuntu / debian package manager, remove it and install a fresh version from pip website.
– Thomas Sablik
Aug 12 at 23:56





Possible duplicate of Python PIP Install throws TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
– Anthony Sottile
Aug 13 at 0:19





Hi guys, thanks for this, i tried with wget bootstrap.pypa.io/get-pip.py, i get error 'wget: unable to resolve host address ‘bootstrap.pypa.io’', i tried with curl bootstrap.pypa.io/get-pip.py -o get-pip.py i get error ' Could not resolve host: bootstrap.pypa.io'. i'm pretty sure that it is connected to internet, since i can ping 8.8.8.8.
– Jeff Hung
Aug 13 at 11:07










By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard