早上好,我遇到了一个让我头疼的问题
我试图在我的RED HAT服务器上安装flask,但是我有无法安装的问题,包括将pip3命令与代理一起使用
sudo pip3安装--proxy http:///xxxxxxxx:xxxxxxxxx@10.164.100.36:8080烧瓶
Exception:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3.6/site-packages/pip/commands/install.py", line 346, in run
requirement_set.prepare_files(finder)
File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 381, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 557, in _prepare_file
require_hashes
File "/usr/lib/python3.6/site-packages/pip/req/req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/lib/python3.6/site-packages/pip/index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/lib/python3.6/site-packages/pip/index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/lib/python3.6/site-packages/pip/index.py", line 568, in _get_pages
page = self._get_page(location)
File "/usr/lib/python3.6/site-packages/pip/index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/lib/python3.6/site-packages/pip/index.py", line 792, in get_page
"Cache-Control": "max-age=600",
File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 543, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python3.6/site-packages/pip/download.py", line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 640, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.6/site-packages/pip/_vendor/cachecontrol/adapter.py", line 47, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/adapters.py", line 440, in send
timeout=timeout
File "/usr/lib/python3.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 595, in urlopen
self._prepare_proxy(conn)
File "/usr/lib/python3.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 816, in _prepare_proxy
conn.connect()
File "/usr/lib/python3.6/site-packages/pip/_vendor/urllib3/connection.py", line 284, in connect
conn = self._new_conn()
File "/usr/lib/python3.6/site-packages/pip/_vendor/urllib3/connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/usr/lib/python3.6/site-packages/pip/_vendor/urllib3/util/connection.py", line 51, in create_connection
if host.startswith('['):
AttributeError: 'NoneType' object has no attribute 'startswith'
我使用了错误的命令,哪个是正确的?