出现SystemTimeWarning:
在安装第三方包时,cmd后输入pip install pymysql时出现以下错误:
SystemTimeWarning,
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1076)'))) - skipping
解决办法:
1、 创建pip文件夹
2、 创建pip.ini 文件
3、 在pip.ini文件上,添加 以下语句
[global]
index-url =https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = https://pypi.tuna.tsinghua.edu.cn
4、设置系统环境
如:C:\Users\Administrator\pip\pip.ini添加到path中
5、cmd中运行pip install pymysql即可