Author peteje66
Recipients ned.deily, peteje66, ronaldoussoren
Date 2020-08-04.10:34:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1596537267.29.0.654374340764.issue41471@roundup.psfhosted.org>
In-reply-to
Content
Using pip fails with the same error messages independent of version an user. Also su or sudo -H doesn't change anything:
How to Reproduce
install python 3.x on your Mac and try pip

After a quite long search I found that it is a problem with the proxy config. You need to remove all settings in network settings/proxy even those defining which domains shouldn't use a proxy. Proxy settings work fine with everything except python.

xcode-select install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install pyenv
pyenv install 3.7.3
pip list --outdated or pip install something
Exception
xxx-MBP:~ xxx$ pip list --outdated
Exception:
Traceback (most recent call last):
  File "/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 179, in main
    status = self.run(options, args)
  File "/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_internal/commands/list.py", line 144, in run
    packages = self.get_outdated(packages, options)
  File "/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_internal/commands/list.py", line 152, in get_outdated
    dist for dist in self.iter_packages_latest_infos(packages, options)
  File "/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_internal/commands/list.py", line 152, in <listcomp>
    dist for dist in self.iter_packages_latest_infos(packages, options)
  File "/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_internal/commands/list.py", line 179, in iter_packages_latest_infos
    all_candidates = finder.find_all_candidates(dist.key)
  File "/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_internal/index.py", line 610, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_internal/index.py", line 743, in _get_pages
    page = _get_html_page(location, session=self.session)
  File "/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_internal/index.py", line 229, in _get_html_page
    resp = _get_html_response(url, session=session)
  File "/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_internal/index.py", line 177, in _get_html_response
    "Cache-Control": "max-age=0",
  File "/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_vendor/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_internal/download.py", line 403, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_vendor/requests/sessions.py", line 524, in request
    prep.url, proxies, stream, verify, cert
  File "/Users/xxxx.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_vendor/requests/sessions.py", line 700, in merge_environment_settings
    env_proxies = get_environ_proxies(url, no_proxy=no_proxy)
  File "/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_vendor/requests/utils.py", line 761, in get_environ_proxies
    if should_bypass_proxies(url, no_proxy=no_proxy):
  File "/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_vendor/requests/utils.py", line 745, in should_bypass_proxies
    bypass = proxy_bypass(parsed.hostname)
  File "/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/urllib/request.py", line 2610, in proxy_bypass
    return proxy_bypass_macosx_sysconf(host)
  File "/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/urllib/request.py", line 2587, in proxy_bypass_macosx_sysconf
    return _proxy_bypass_macosx_sysconf(host, proxy_settings)
  File "/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/urllib/request.py", line 2573, in _proxy_bypass_macosx_sysconf
    if (hostIP >> mask) == (base >> mask):
ValueError: negative shift count
History
Date User Action Args
2020-08-04 10:34:27peteje66setrecipients: + peteje66, ronaldoussoren, ned.deily
2020-08-04 10:34:27peteje66setmessageid: <1596537267.29.0.654374340764.issue41471@roundup.psfhosted.org>
2020-08-04 10:34:26peteje66linkissue41471 messages
2020-08-04 10:34:26peteje66create