在Mac上安装了Python 3.6版本,使用urllib库访问网页却返回了
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)
这样的错误。
这是由于MacOS版本的python 3.6版本没有使用系统的openssl进行证书验证。在/Applications/Python\ 3.6/
目录下可以找到Readme.rtf文件,其中说明到:
NEW This variant of Python 3.6 now includes its own private copy of OpenSSL 1.0.2. Unlike previous releases, the deprecated Apple-supplied OpenSSL libraries are no longer used. This also means that the trust certificates in system and user keychains managed by the Keychain Access application and the security command line uti