欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

win10 pip ERROR: Could not find a version that satisfies the requirement

程序员文章站 2022-05-27 10:29:33
...

输入:

C:\WINDOWS\system32>pip --trusted-host=tsinghua.edu.cn install h5py

报错:

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x00000221DDE0D070>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/h5py/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x00000221DDE0D3A0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/h5py/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x00000221DDE0D4F0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/h5py/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x00000221DDE0D760>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/h5py/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x00000221DDE0D820>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/h5py/
ERROR: Could not find a version that satisfies the requirement h5py (from versions: none)
ERROR: No matching distribution found for h5py

可能的原因:没有设置代理

解决:

C:\WINDOWS\system32>set http_proxy=http://10.xxx.xxx.xxx:8080
C:\WINDOWS\system32>set https_proxy=https://10.xxx.xxx.xxx:8080
C:\WINDOWS\system32>pip --trusted-host=tsinghua.edu.cn install h5py --user

 

相关标签: Python # DL-报错