pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

來源:互聯網
上載者:User

標籤:body   color   oca   style   setup   編譯安裝   ble   nss   bsp   

# 背景

安裝pip後發現執行pip install pytest,提示下面錯誤

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

 

# 解決方案

查詢了資料,大概意思是,新版的pip預設要使用SSL,可以通過設定修改,但木有發現pip.conf檔案在哪裡,囧rz,後續再研究下

但找到另外一個解決方案

先安裝openssl-dev,然後重新編譯安裝,只是在編譯的過程中加入 --enable-optimizations

具體如下:

sudo yum install openssl-dev然後:./configure --enable-optimizationsmake && make install

這樣就可以了的 

 

實際上解決方案挺多的

1. 修改pip.conf

2. 修改安裝目錄下module下的setup檔案

3. 安裝openssl後,編譯時間加上--enable-optimizations

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.