'[SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败:无法获取本地发行者证书

时间:2019-09-26 12:34:52

标签: python mysql macos pip ssl-certificate

第一期:

当我运行收到的程序时,我正在使用MackBook Pro在连接到MySQL的PyCharm中运行python3程序

ModuleNotFoundError: No module named 'mysql

第1行是

import mysql.connector

我尝试过的事情:

我尝试使用pip

安装mysql
pip3 install mysql-connector-python

新问题:

执行时

pip install mysql-connector-python

收到:

Could not fetch URL https://pypi.org/simple/mysql-connector-python/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/mysql-connector-python/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)'))) - skipping
  Could not find a version that satisfies the requirement mysql-connector-python (from versions: )
No matching distribution found for mysql-connector-python
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: unable to get local issuer certificate (_ssl.c:1076)'))) - skipping" 

0 个答案:

没有答案
相关问题