Linux与后台开发归档Python

[Centos&Python]python3以及安装pi

2019-01-22  本文已影响8人  _小老虎_

解决:

python安装完毕后,提示找不到ssl模块:
例如这样:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting xxx
Could not fetch URL https://pypi.python.org/simple/xxxx/: 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 xxx (from versions: )
No matching distribution found for xxx


yum install openssl openssl-devel -y 

或者单独编译:
https://blog.csdn.net/m0_38016951/article/details/81195377

# Socket module helper for socket(2)
#_socket socketmodule.c

# Socket module helper for SSL support; you must comment out the other
# socket line above, and possibly edit the SSL variable:
SSL=/usr/local/ssl
_ssl _ssl.c \
    -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
    -L$(SSL)/lib -lssl -lcrypto

# The crypt module is now disabled by default because it breaks builds
# on many systems (where -lcrypt is needed), e.g. Linux (I believe).

重新编译

make 
make install
上一篇下一篇

猜你喜欢

热点阅读