【发布时间】:2015-09-09 18:30:10
【问题描述】:
尝试使用 pip 安装应用程序时出现以下错误。
Collecting django
Exception:
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\pip\basecommand.py", line 232, in main
status = self.run(options, args)
File "C:\Python34\lib\site-packages\pip\commands\install.py", line 339, in run
requirement_set.prepare_files(finder)
File "C:\Python34\lib\site-packages\pip\req\req_set.py", line 333, in prepare_files
upgrade=self.upgrade,
File "C:\Python34\lib\site-packages\pip\index.py", line 305, in find_requirement
page = self._get_page(main_index_url, req)
File "C:\Python34\lib\site-packages\pip\index.py", line 783, in _get_page
return HTMLPage.get_page(link, req, session=self.session)
File "C:\Python34\lib\site-packages\pip\index.py", line 872, in get_page
"Cache-Control": "max-age=600",
File "C:\Python34\lib\site-packages\pip\_vendor\requests\sessions.py", line 473, in get
return self.request('GET', url, **kwargs)
File "C:\Python34\lib\site-packages\pip\download.py", line 365, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "C:\Python34\lib\site-packages\pip\_vendor\requests\sessions.py", line 461, in request
resp = self.send(prep, **send_kwargs)
File "C:\Python34\lib\site-packages\pip\_vendor\requests\sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "C:\Python34\lib\site-packages\pip\_vendor\cachecontrol\adapter.py", line 43, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "C:\Python34\lib\site-packages\pip\_vendor\requests\adapters.py", line 337, in send
conn = self.get_connection(request.url, proxies)
File "C:\Python34\lib\site-packages\pip\_vendor\requests\adapters.py", line 245, in get_connection
proxy_manager = self.proxy_manager_for(proxy)
File "C:\Python34\lib\site-packages\pip\_vendor\requests\adapters.py", line 155, in proxy_manager_for
**proxy_kwargs)
File "C:\Python34\lib\site-packages\pip\_vendor\requests\packages\urllib3\poolmanager.py", line 265, in proxy_from_url
return ProxyManager(proxy_url=url, **kw)
File "C:\Python34\lib\site-packages\pip\_vendor\requests\packages\urllib3\poolmanager.py", line 216, in __init__
'Not supported proxy scheme %s' % proxy.scheme
AssertionError: Not supported proxy scheme abden003
我曾尝试运行以下命令,但在两种情况下都出现相同的错误(我曾尝试同时使用 python 和 python3):
pip install django
pip install django --proxy http://abden003:password@proxy.server.addr:port
pip3 install django
pip3 install django --proxy http://abden003:password@proxy.server.addr:port
问题不在于我的代理服务器,因为我在 Linux vm 中尝试过它,它工作正常。好像是windows版pip的问题。
我尝试了以下方法,但没有解决问题:
【问题讨论】:
-
它只是 django,你是否也尝试过 pip install 其他东西?
-
是的,我尝试安装几个软件包,它们都给出相同的错误
-
这可能会回答您的问题:stackoverflow.com/questions/26109264/…
-
我试过这个,但没有解决问题
-
您是否尝试卸载并重新安装 pip,并且您确定您使用的是最新版本的 python(2.7.x 或 3.x)?