在使用python2.7.5的时候
1.使用pip install pyMySql 或者安装whl包的时候出现这个问题
InsecurePlatformWarning:
A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade
to a newer version of Python to solve this.
SNIMissingWarning: An HTT
PS request has been made, but the SNI (Server Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrec
t TLS certificate, which can cause validation failures
导致安装包一直不成功,网上看了好多办法,都说的不行,下面看我的做法,解决window上这个问题
第一步: 在${user}盘符下创建一个文件夹 pip ,在pip文件夹中新建pip.ini文件,内容如下:
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
在命令行执行pip命令时,指定--trusted-host ,完整命令如下:
pip2 --trusted-host mirrors.aliyun.com install D:\developTool\pytho
n\python27\PyMySQL-0.9.2-py2.py3-none-any.whl