request模块报ssl connections to fail

今天在用request模块连接微信企业号接口时,运行报如下错误:

request appropriately and may cause certain ssl connections to fail.

最后用2条命令解决:

yum install python-devel libffi-devel openssl-devel
pip install pyopenssl ndg-httpsclient pyasn1

安装完好后会有仍会有如下警告:

/usr/lib64/python2.6/site-packages/cryptography/__init__.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6
DeprecationWarning

从提示很明显可以看出cyptography不在支持2.6版本了,升级到2.7就没问题了。