[英]how to pip install with proxy
I tried this command 我试过这个命令
pip install --proxy="username:password@192.168.1.1:3128" packagename
and the error message say: 并且错误消息说:
Traceback (most recent call last):
File "/usr/local/python3.5/lib/python3.5/site-packages/pip-1.5.5-py3.5.egg/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/local/python3.5/lib/python3.5/site-packages/pip-1.5.5-py3.5.egg/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/local/python3.5/lib/python3.5/site-packages/pip-1.5.5-py3.5.egg/pip/req.py", line 1177, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "/usr/local/python3.5/lib/python3.5/site-packages/pip-1.5.5-py3.5.egg/pip/index.py", line 194, in find_requirement
page = self._get_page(main_index_url, req)
File "/usr/local/python3.5/lib/python3.5/site-packages/pip-1.5.5-py3.5.egg/pip/index.py", line 568, in _get_page
session=self.session,
File "/usr/local/python3.5/lib/python3.5/site-packages/pip-1.5.5-py3.5.egg/pip/index.py", line 670, in get_page
resp = session.get(url, headers={"Accept": "text/html"})
File "/usr/local/python3.5/lib/python3.5/site-packages/pip-1.5.5-py3.5.egg/pip/_vendor/requests/sessions.py", line 395, in get
return self.request('GET', url, **kwargs)
File "/usr/local/python3.5/lib/python3.5/site-packages/pip-1.5.5-py3.5.egg/pip/download.py", line 237, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/local/python3.5/lib/python3.5/site-packages/pip-1.5.5-py3.5.egg/pip/_vendor/requests/sessions.py", line 383, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/python3.5/lib/python3.5/site-packages/pip-1.5.5-py3.5.egg/pip/_vendor/requests/sessions.py", line 486, in send
r = adapter.send(request, **kwargs)
File "/usr/local/python3.5/lib/python3.5/site-packages/pip-1.5.5-py3.5.egg/pip/_vendor/requests/adapters.py", line 305, in send
conn = self.get_connection(request.url, proxies)
File "/usr/local/python3.5/lib/python3.5/site-packages/pip-1.5.5-py3.5.egg/pip/_vendor/requests/adapters.py", line 206, in get_connection
except_on_missing_scheme(proxy)
File "/usr/local/python3.5/lib/python3.5/site-packages/pip-1.5.5-py3.5.egg/pip/_vendor/requests/utils.py", line 631, in except_on_missing_scheme
raise MissingSchema('Proxy URLs must have explicit schemes.')
pip._vendor.requests.exceptions.MissingSchema: Proxy URLs must have explicit schemes.
By the way, I remember if the username or password has the interpunction like "." 顺便说一句,我记得用户名或密码是否有像“。”这样的交集。 it must be replaced with something but I forget about that.
必须用一些东西替换它,但我忘记了。 Can anyone remind me of that?
谁能让我想起那个? Thanks!
谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.