嵌入式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]$
...全文
194 点赞 收藏 5
写回复
5 条回复
哈特比尔波 2020年04月21日
引用 5 楼 Termux_PRO 的回复:
Time Out 网络原因,建议换源
谢谢,以前没有听说过python还有源的这个情况。 只知道ubuntu 更新系统有换源的这种操作,后来才知道linux都有这个说法。 今天也算是知道了程序更新也有源这种说法。谢谢!
回复 点赞
三滑稽甲苯 2020年02月28日
Time Out 网络原因,建议换源
回复 点赞
哈特比尔波 2020年01月18日
我已经重新下载最新的Python3.8.1稳定版本的安装包。压缩包实在没有耐心研究了。用安装包,直接搞定。
回复 点赞
哈特比尔波 2020年01月11日
引用 2 楼 tjh_Maya动画技术 的回复:
打开python目录下的python38._pth ,去掉#import site 行的#号,重新运行 D:\python3.8.0\python.exe get-pip.py 即可,我在window下安装的。测试通过,安装了更多其他模块。阿弥陀佛。哈哈。
好的,我试试。
回复 点赞
Maya动画技术 2019年12月17日
打开python目录下的python38._pth ,去掉#import site 行的#号,重新运行 D:\python3.8.0\python.exe get-pip.py 即可,我在window下安装的。测试通过,安装了更多其他模块。阿弥陀佛。哈哈。
回复 点赞
发动态
发帖子
脚本语言(Perl/Python)
创建于2007-08-27

1.5w+

社区成员

3.3w+

社区内容

其他开发语言 脚本语言(Perl ,Python)
社区公告
暂无公告