嵌入式Python3.8.0如何安装pip?
哈特比尔波 2019-10-27 02:48:34 我在我的windows 10系统配置python3.8.0时遇到了以下问题,请大家帮忙解决以下这个问题。
我说下具体的情况:
我从python官网上下载了window版本的python3.8.0的压缩包,将其解压到D:\python3.8.0下,并配置相应的系统环境变量。
接着我需要安装pip,以便后续安装其他需要的python库。
但是发生了如下问题:这个get-pip.py是我根据pip的安装文档找到的连接下载的文件,并将其放在了python3.8.0文件夹下。接着就发生了下面代码上的事情。恳求大家帮忙处理下这个问题。谢谢!
[D:\Python3.8.0]$ python get-pip.py
Collecting pip
Downloading https://files.pythonhosted.org/packages/00/b6/9cfa56b4081ad13874b0c6f96af8ce16cfbc1cb06bedf8e9164ce5551ec1/pip-19.3.1-py2.py3-none-any.whl (1.4MB)
ERROR: Exception:
Traceback (most recent call last):
File "C:\Users\fsceo\AppData\Local\Temp\tmptfw7st2o\pip.zip\pip\_vendor\urllib3\response.py", line 425, in _error_catcher
yield
File "C:\Users\fsceo\AppData\Local\Temp\tmptfw7st2o\pip.zip\pip\_vendor\urllib3\response.py", line 507, in read
data = self._fp.read(amt) if not fp_closed else b""
File "C:\Users\fsceo\AppData\Local\Temp\tmptfw7st2o\pip.zip\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "http\client.py", line 454, in read
File "http\client.py", line 498, in readinto
File "socket.py", line 669, in readinto
File "ssl.py", line 1241, in recv_into
File "ssl.py", line 1099, in read
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\fsceo\AppData\Local\Temp\tmptfw7st2o\pip.zip\pip\_internal\cli\base_command.py", line 153, in _main
status = self.run(options, args)
File "C:\Users\fsceo\AppData\Local\Temp\tmptfw7st2o\pip.zip\pip\_internal\commands\install.py", line 382, in run
resolver.resolve(requirement_set)
File "C:\Users\fsceo\AppData\Local\Temp\tmptfw7st2o\pip.zip\pip\_internal\legacy_resolve.py", line 201, in resolve
self._resolve_one(requirement_set, req)
File "C:\Users\fsceo\AppData\Local\Temp\tmptfw7st2o\pip.zip\pip\_internal\legacy_resolve.py", line 365, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "C:\Users\fsceo\AppData\Local\Temp\tmptfw7st2o\pip.zip\pip\_internal\legacy_resolve.py", line 312, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(
File "C:\Users\fsceo\AppData\Local\Temp\tmptfw7st2o\pip.zip\pip\_internal\operations\prepare.py", line 191, in prepare_linked_requirement
unpack_url(
File "C:\Users\fsceo\AppData\Local\Temp\tmptfw7st2o\pip.zip\pip\_internal\download.py", line 459, in unpack_url
unpack_http_url(
File "C:\Users\fsceo\AppData\Local\Temp\tmptfw7st2o\pip.zip\pip\_internal\download.py", line 312, in unpack_http_url
from_path, content_type = _download_http_url(link,
File "C:\Users\fsceo\AppData\Local\Temp\tmptfw7st2o\pip.zip\pip\_internal\download.py", line 551, in _download_http_url
_download_url(resp, link, content_file, hashes, progress_bar)
File "C:\Users\fsceo\AppData\Local\Temp\tmptfw7st2o\pip.zip\pip\_internal\download.py", line 253, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "C:\Users\fsceo\AppData\Local\Temp\tmptfw7st2o\pip.zip\pip\_internal\utils\hashes.py", line 80, in check_against_chunks
for chunk in chunks:
File "C:\Users\fsceo\AppData\Local\Temp\tmptfw7st2o\pip.zip\pip\_internal\download.py", line 223, in written_chunks
for chunk in chunks:
File "C:\Users\fsceo\AppData\Local\Temp\tmptfw7st2o\pip.zip\pip\_internal\utils\ui.py", line 160, in iter
for x in it:
File "C:\Users\fsceo\AppData\Local\Temp\tmptfw7st2o\pip.zip\pip\_internal\download.py", line 188, in resp_read
for chunk in resp.raw.stream(
File "C:\Users\fsceo\AppData\Local\Temp\tmptfw7st2o\pip.zip\pip\_vendor\urllib3\response.py", line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "C:\Users\fsceo\AppData\Local\Temp\tmptfw7st2o\pip.zip\pip\_vendor\urllib3\response.py", line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "contextlib.py", line 131, in __exit__
File "C:\Users\fsceo\AppData\Local\Temp\tmptfw7st2o\pip.zip\pip\_vendor\urllib3\response.py", line 430, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
[D:\Python3.8.0]$