프록시 뒤에서 pip를 업그레이드할 수 없습니다

프록시 뒤에서 pip를 업그레이드할 수 없습니다

나는 이 다른 질문에 있는 모든 제안을 시도했지만 나에게는 효과가 없습니다.pip를 업그레이드할 수 없습니다

나는 Ubuntu 12.04를 실행 중이고 를 사용하여 pip 1.0을 설치할 수 있었지만 apt해당 버전에는 분명히 프록시와 잘 작동하지 않는 버그가 있으므로 어떻게 업데이트할 수 있는지 모르겠습니다.

내 콘솔에 표시되는 내용은 다음과 같습니다.

$ pip --version
pip 1.0 from /usr/lib/python2.7/dist-packages (python 2.7)
$ which pip
/usr/local/bin/pip

#1을 시도해 보세요

$ pip --proxy=$http_proxy install -U pip
Downloading/unpacking pip
  Cannot fetch index base URL http://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement pip
No distributions at all found for pip
Storing complete log in /home/falconer_k/.pip/pip.log

#2를 시도해 보세요

$ python ~/Downloads/get-pip.py --proxy=$http_proxy
/usr/lib/python2.7/dist-packages/setuptools/command/install_scripts.py:3:
UserWarning: Module pip was already imported from 
/tmp/tmpqbetIm/pip.zip/pip/__init__.py, but /usr/lib/python2.7/dist-packages
is being added to sys.path from pkg_resources import Distribution, PathMetadata, ensure_directory
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after 
connection broken by 'ProxyError('Cannot connect to proxy.', 
NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.Verified
HTTPSConnection object at 0x392eed0>: Failed to establish a new connection: 
[Errno -2] Name or service not known',))': /simple/pip/

simple/pip브라우저를 사용하여 폴더에 직접 액세스할 수 있습니다 .

https://pypi.python.org/simple/pip/

또한 프록시되지 않은 연결을 사용할 수 있는 옵션도 없습니다.

~/.pip/pip.log의 내용은 다음과 같습니다.

------------------------------------------------------------
/usr/bin/pip run on Tue May  3 15:33:22 2016
Downloading/unpacking pip
  Getting page http://pypi.python.org/simple/pip
  Could not fetch URL http://pypi.python.org/simple/pip: timed out
  Will skip URL http://pypi.python.org/simple/pip when looking for download links for pip
  Getting page http://pypi.python.org/simple/
  Could not fetch URL http://pypi.python.org/simple/: <urlopen error [Errno 113] No route to host>
  Will skip URL http://pypi.python.org/simple/ when looking for download links for pip
  Cannot fetch index base URL http://pypi.python.org/simple/
  URLs to search for versions for pip:
  * http://pypi.python.org/simple/pip/
  Getting page http://pypi.python.org/simple/pip/
  Could not fetch URL http://pypi.python.org/simple/pip/: <urlopen error [Errno 113] No route to host>
  Will skip URL http://pypi.python.org/simple/pip/ when looking for download links for pip
  Could not find any downloads that satisfy the requirement pip
No distributions at all found for pip
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 126, in main
    self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 223, 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 948, in prepare_files
    url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 152, in find_requirement
    raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for pip

답변1

아래를 시도해 보세요.

pip install --proxy=user:pass@server:port <package Name>

예를 들어

pip install --proxy=http://10.10.10.150/accelerated_pac_base.pac quandl 

관련 정보