久久精品人人爽,华人av在线,亚洲性视频网站,欧美专区一二三

ubuntu pip is configured with locations that require TLS/SSL錯誤怎么解決

163次閱讀
沒有評論

共計 3144 個字符,預(yù)計需要花費 8 分鐘才能閱讀完成。

行業(yè)資訊    
服務(wù)器    
ubuntu pip is configured with locations that require TLS/SSL 錯誤怎么解決

這篇文章主要介紹“ubuntu pip is configured with locations that require TLS/SSL 錯誤怎么解決”,在日常操作中,相信很多人在 ubuntu pip is configured with locations that require TLS/SSL 錯誤怎么解決問題上存在疑惑,丸趣 TV 小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”ubuntu pip is configured with locations that require TLS/SSL 錯誤怎么解決”的疑惑有所幫助!接下來,請跟著丸趣 TV 小編一起來學習吧!

背景:
ubuntu 14.04

python3.8 
使用 pip install pymsql 提示錯誤:

WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting django
 WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by  SSLError(Can t connect to HTTPS URL because the SSL module is not available.) : /simple/django/
 WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by  SSLError(Can t connect to HTTPS URL because the SSL module is not available.) : /simple/django/
 WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by  SSLError(Can t connect to HTTPS URL because the SSL module is not available.) : /simple/django/
 WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by  SSLError(Can t connect to HTTPS URL because the SSL module is not available.) : /simple/django/
 WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by  SSLError(Can t connect to HTTPS URL because the SSL module is not available.) : /simple/django/
 Could not fetch URL https://pypi.org/simple/django/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host= pypi.org , port=443): Max retries exceeded with url: /simple/django/ (Caused by SSLError( Can t connect to HTTPS URL because the SSL module is not available.)) - skipping
 ERROR: Could not find a version that satisfies the requirement django (from versions: none)
ERROR: No matching distribution found for django
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host= pypi.org , port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError( Can t connect to HTTPS URL because the SSL module is not available.)) - skipping

原因:

因為 pip 安裝第三方庫需要 ssl 模塊,而 python 默認安裝 ssl 功能是不可用的

第一種解決方法:

解決辦法是重新編譯 python3 安裝文件,加上 –with-ssl 參數(shù)就可以讓 pip3 使用 ssl 功能了

# 重新編譯安裝
./configure --enable-optimizations --with-ssl

Ubuntu 16.04 安裝(install)python3.8

第二種解決方法:更換 pip 源

永久修改 pip 源

如果需要永久修改 pip 的軟件鏡像源,可以通過修改配置文件實現(xiàn)。

在 Linux 下,修改~/.pip/pip.conf,如果沒有則創(chuàng)建:

mkdir ~/.pip
vim ~/.pip/pip.conf

添加以下內(nèi)容

[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.aliyun.com

或者是:

[global] 
timeout = 6000 
index-url = http://pypi.douban.com/simple/ 
[install] 
use-mirrors = true 
mirrors = http://pypi.douban.com/simple/ 
trusted-host = pypi.douban.com

到此,關(guān)于“ubuntu pip is configured with locations that require TLS/SSL 錯誤怎么解決”的學習就結(jié)束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學習,快去試試吧!若想繼續(xù)學習更多相關(guān)知識,請繼續(xù)關(guān)注丸趣 TV 網(wǎng)站,丸趣 TV 小編會繼續(xù)努力為大家?guī)砀鄬嵱玫奈恼拢?/p>

正文完
 
丸趣
版權(quán)聲明:本站原創(chuàng)文章,由 丸趣 2023-07-13發(fā)表,共計3144字。
轉(zhuǎn)載說明:除特殊說明外本站除技術(shù)相關(guān)以外文章皆由網(wǎng)絡(luò)搜集發(fā)布,轉(zhuǎn)載請注明出處。
評論(沒有評論)
主站蜘蛛池模板: 两当县| 井陉县| 宜丰县| 双牌县| 炎陵县| 彭阳县| 永康市| 铜梁县| 关岭| 桐乡市| 额济纳旗| 庆元县| 黄浦区| 九龙城区| 门头沟区| 周至县| 丰都县| 吉水县| 阜南县| 临西县| 黔江区| 沧州市| 贵定县| 和政县| 彭泽县| 湄潭县| 福州市| 西充县| 富裕县| 合江县| 长治县| 长沙市| 龙游县| 黑山县| 郑州市| 阳东县| 弋阳县| 寿宁县| 三明市| 广灵县| 八宿县|