問題描述:執行pip install pykafka命令時出現
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting pykafka
Could not fetch URL https://pypi.python.org/simple/pykafka/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement pykafka (from versions: )
No matching distribution found for pykafka
問題解決:
在./configure過程中,如果沒有加上–with-ssl參數時,默認安裝的軟件涉及到ssl的功能不可用,
剛好pip3過程需要ssl模塊,而由於沒有指定,所以該功能不可用。
查看openssl安裝包,發現缺少openssl-devel包
-
查看openssl安裝包,發現缺少openssl-devel包
[root@localhost ~]# rpm -aq|grep openssl
openssl-0.9.8e-20.el5
openssl-0.9.8e-20.el5
[root@localhost ~]# -
yum安裝openssl-devel
[root@localhost ~]# yum install openssl-devel -y
查看安裝結果
[root@localhost ~]# rpm -aq|grep openssl
openssl-0.9.8e-26.el5_9.1
openssl-0.9.8e-26.el5_9.1
openssl-devel-0.9.8e-26.el5_9.1
openssl-devel-0.9.8e-26.el5_9.1 -
重新對python3.6進行編譯安裝,用一下過程來實現編譯安裝:
cd Python-3.6.4
./configure --with-ssl
make
sudo make install
重新運行pip install pykafka時,又出現此提示;
You are using pip version 9.0.1, however version 19.2.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
運行
pip install --upgrade pip
