第一次用这个网站不熟悉,不能发图片,我直接贴错误代码 了
C:\Program Files\Python37\pip-9.0.1>pip install requests Collecting requests Exception: Traceback (most recent call last): File "C:\Program Files\Python37\lib\site-packages\pip\basecommand.py", line 215, in main status = self.run(options, args) File "C:\Program Files\Python37\lib\site-packages\pip\commands\install.py", line 324, in run requirement_set.prepare_files(finder) File "C:\Program Files\Python37\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "C:\Program Files\Python37\lib\site-packages\pip\req\req_set.py", line 554, in _prepare_file require_hashes File "C:\Program Files\Python37\lib\site-packages\pip\req\req_install.py", line 278, in populate_link self.link = finder.find_requirement(self, upgrade) File "C:\Program Files\Python37\lib\site-packages\pip\index.py", line 465, in find_requirement all_candidates = self.find_all_candidates(req.name) File "C:\Program Files\Python37\lib\site-packages\pip\index.py", line 423, in find_all_candidates for page in self._get_pages(url_locations, project_name): File "C:\Program Files\Python37\lib\site-packages\pip\index.py", line 568, in _get_pages page = self._get_page(location) File "C:\Program Files\Python37\lib\site-packages\pip\index.py", line 683, in _get_page return HTMLPage.get_page(link, session=self.session) File "C:\Program Files\Python37\lib\site-packages\pip\index.py", line 792, in get_page "Cache-Control": "max-age=600", File "C:\Program Files\Python37\lib\site-packages\pip_vendor\requests\sessions.py", line 488, in get return self.request('GET', url, **kwargs) File "C:\Program Files\Python37\lib\site-packages\pip\download.py", line 386, in request return super(PipSession, self).request(method, url, *args, **kwargs) File "C:\Program Files\Python37\lib\site-packages\pip_vendor\requests\sessions.py", line 475, in request resp = self.send(prep, **send_kwargs) File "C:\Program Files\Python37\lib\site-packages\pip_vendor\requests\sessions.py", line 596, in send r = adapter.send(request, **kwargs) File "C:\Program Files\Python37\lib\site-packages\pip_vendor\cachecontrol\adapter.py", line 47, in send resp = super(CacheControlAdapter, self).send(request, **kw) File "C:\Program Files\Python37\lib\site-packages\pip_vendor\requests\adapters.py", line 423, in send timeout=timeout File "C:\Program Files\Python37\lib\site-packages\pip_vendor\requests\packages\urllib3\connectionpool.py", line 589, in urlopen self._prepare_proxy(conn) File "C:\Program Files\Python37\lib\site-packages\pip_vendor\requests\packages\urllib3\connectionpool.py", line 797, in _prepare_proxy conn.connect() File "C:\Program Files\Python37\lib\site-packages\pip_vendor\requests\packages\urllib3\connection.py", line 254, in connect conn = self._new_conn() File "C:\Program Files\Python37\lib\site-packages\pip_vendor\requests\packages\urllib3\connection.py", line 142, in _new_conn (self.host, self.port), self.timeout, **extra_kw) File "C:\Program Files\Python37\lib\site-packages\pip_vendor\requests\packages\urllib3\util\connection.py", line 66, in create_connection if host.startswith('['): AttributeError: 'NoneType' object has no attribute 'startswith'
C:\Program Files\Python37\pip-9.0.1> C:\Program Files\Python37\pip-9.0.1>
这是我,安装一个最简单的库 pip install requests 没有其他的库 安装失败了,我重装过 python 和 pip 版本是 python3.7, pip 是最新版, 不要再说,是版本的问题,因为我在其他两台电脑上面用相同的安装包,都是可以正常安装的, 我重装之后,清理过注册表,能清理的方式都清理过了,也使用过,管理权安装,也更换过,安装盘符,变量路径也添加了,也使用过.whl 的方式安装,也使用过 Anaconda,但是都是不可以的,我又回到了原点,如果谁可以帮我解决,我有偿也是情愿的,感激不尽!!!
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.