最近在安裝python包的時(shí)候老是報(bào)一個(gè)錯(cuò)誤:
PS C:\Users\Administrator> pip install matplotlib
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', TimeoutError('_ssl.c:980: The handshake operation timed out'))': /simple/matplotlib/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', TimeoutError('_ssl.c:980: The handshake operation timed out'))': /simple/matplotlib/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', TimeoutError('_ssl.c:980: The handshake operation timed out'))': /simple/matplotlib/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', TimeoutError('_ssl.c:980: The handshake operation timed out'))': /simple/matplotlib/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', TimeoutError('_ssl.c:980: The handshake operation timed out'))': /simple/matplotlib/
ERROR: Could not find a version that satisfies the requirement matplotlib (from versions: none)
ERROR: No matching distribution found for matplotlib
WARNING: There was an error checking the latest version of pip.
不管怎么裝,都裝不上,不同的包都是報(bào)這個(gè)錯(cuò)誤,在網(wǎng)上找到的內(nèi)容大多都相同,說(shuō)是重新安裝,或者加參數(shù),結(jié)果全沒(méi)用,最后準(zhǔn)備排查python版本的問(wèn)題,準(zhǔn)備降級(jí)試一下。
因?yàn)橹鞍惭b的時(shí)候,是安裝的3.10.2,以為是包不支持3.10或3.11,準(zhǔn)備跑官網(wǎng)準(zhǔn)備下載3.9試試,但是想想3.10都已經(jīng)出來(lái)那么久了,3.11都出來(lái)了,沒(méi)道理不支持,就再去看了一下3.10的版本,最新的是3.10.9,而主要版本是3.10.8。
Python 3.10.8 is the newest major release of the Python programming language, and it contains many new features and optimizations.
一般來(lái)說(shuō),包的支持的應(yīng)該都是支持主要版本,而我安裝的3.10.2,估計(jì)是版本不對(duì),遂升級(jí)到3.10.9,OK,解決了,升級(jí)之后一下就安裝上了。。。。文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-522972.html
所以以后安裝python的時(shí)候,還是直接裝主要版本吧,其它小版本直接跳過(guò)了。文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-522972.html
到了這里,關(guān)于PIP安裝python包,報(bào)ERROR: No matching distribution found for XXXXX 問(wèn)題的處理的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!