linux python安装报错TLS SSL

葫芦的运维日志

下一篇 搜索 上一篇

2018/10/23 11:43


pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting Mysql-python
  Could not fetch URL https://pypi.python.org/simple/mysql-python/: 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 Mysql-python (from versions: )
No matching distribution found for Mysql-python

解决方发:

1.openssl openssl-devel安装

[root@ ~]#yum install openssl openssl-devel

[root@ ~]#rpm -aq|grep openssl
openssl098e-0.9.8e-18.tl1.2.x86_64
openssl098e-0.9.8e-18.tl1.2.i686
openssl-1.0.1e-48.tl1.5.x86_64
openssl-1.0.1e-48.tl1.5.i686
openssl-devel-1.0.1e-48.tl1.5.x86_64

2.重新编译安装python

./configure --prefix=/usr/local/Python27
make
make install

3.测试pip

pip install Mysql-python
Collecting Mysql-python
  Downloading https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip (108kB)
    100% |################################| 112kB 155kB/s
Installing collected packages: Mysql-python

 

葫芦的运维日志

打赏

上一篇 搜索 下一篇
© 冰糖葫芦甜(bthlt.com) 2019 王梓 打赏联系方式 陕ICP备17005322号