起因是想在anconda虚拟环境下安装tensorflow来着,结果发现安装不了,显示警告报错,看样子是找不到资源
一开始以为访问不到资源,就换镜像,然后发现还是这样,网上找一样的指令跑,我还是报错。
今天后知后觉,可能是开着梯子的话,访问不了国内的镜像源,我用的清华源,其他的不清楚。
试了一下还真是,醉了。
解决方法就是关掉梯子再试一遍。
'(ml_py38)'C:\Users\code>pip install tensorflow==2.23
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 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1131)'))': /simple/tensorflow/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1131)'))': /simple/tensorflow/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1131)'))': /simple/tensorflow/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1131)'))': /simple/tensorflow/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1131)'))': /simple/tensorflow/
Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/tensorflow/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.tuna.tsinghua.edu.cn', port=443): Max retries exceeded with url: /simple/tensorflow/ (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1131)'))) - skipping
ERROR: Could not find a version that satisfies the requirement tensorflow==2.23 (from versions: none)
ERROR: No matching distribution found for tensorflow==2.23
Retrieving notices: ...working... done
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 502 BAD GATEWAY for url <http://mirros.tuna.tsinghua.edu.cn/pkgs/free/win-64/current_repodata.json>
Elapsed: 00:00.027827
A remote server error occurred when trying to retrieve this URL.
A 500-type error (e.g. 500, 501, 502, 503, etc.) indicates the server failed to
fulfill a valid request. The problem may be spurious, and will resolve itself if you
try your request again. If the problem persists, consider notifying the maintainer
of the remote server.