Reputation: 796
pip is installed on my system but whenever I try to install any package it throws below exception. Same exception comes on installing each and every package. I could not find this anywhere on web. Please help.
pip install django-social-auth
Downloading/unpacking django-social-auth
Cleaning up...
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg/pip/commands/install.py", line 274, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg/pip/req.py", line 1166, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "/Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg/pip/index.py", line 194, in find_requirement
page = self._get_page(main_index_url, req)
File "/Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg/pip/index.py", line 568, in _get_page
session=self.session,
File "/Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg/pip/index.py", line 670, in get_page
resp = session.get(url, headers={"Accept": "text/html"})
File "/Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg/pip/_vendor/requests/sessions.py", line 395, in get
return self.request('GET', url, **kwargs)
File "/Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg/pip/download.py", line 237, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg/pip/_vendor/requests/sessions.py", line 356, in request
env_proxies = get_environ_proxies(url) or {}
File "/Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg/pip/_vendor/requests/utils.py", line 504, in get_environ_proxies
bypass = proxy_bypass(netloc)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 1433, in proxy_bypass
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 1413, in proxy_bypass_macosx_sysconf
ValueError: negative shift count
Upvotes: 3
Views: 3065
Reputation: 3500
If @Martijn Pieters' answer doesn't fix it for you, be sure to check the "Bypass proxy settings hosts" section.
Try removing the addresses in that field, click apply changes and try again.
Upvotes: 0
Reputation: 1122372
The urllib
module used by pip
will automatically load proxy configuration from your OS.
In this case, this fails because you appear to have some malformed proxy configuration, in the proxy-bypass field. Verify that your proxy configuration is correct. On Mac, do so under System Preferences > Network.
Upvotes: 3
Reputation: 131
Bypass proxy settings hosts section. i removed them and its working fine now. ----This worked for me as well
Upvotes: 0