ImportError: pycurl: libcurl link-time ssl backend (nss) is different from compile-time ssl backend

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zhifeng172/article/details/81215062

[root@VM_0_10_centos 529]# python3
Python 3.6.2 (default, Jun 20 2018, 09:40:19)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pycurl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: pycurl: libcurl link-time ssl backend (nss) is different from compile-time ssl backend (openssl)


solution:
pip3 uninstall pycurl
export PYCURL_SSL_LIBRARY=nss
pip3 install --ignore-installed pycurl

备注:如果uninstall无法移除,则手动移除
mv /usr/local/python3/lib/python3.6/site-packages/pycurl* /home

SSL库可以通过curl -V查看
$curl -V
curl 7.24.0 (x86_64-unknown-linux-gnu) libcurl/7.29.0 NSS/3.34 zlib/1.2.7 libidn/1.28 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz

猜你喜欢

转载自blog.csdn.net/zhifeng172/article/details/81215062
SSL
今日推荐