我正在尝试运行以下命令:
fetch_openml('mnist_784')
从sklearn
图书馆。我不断收到以下错误消息:
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)>
我在线搜索并尝试从终端pip install certifi
运行open /Applications/Python\ 3.6/Install\ Certificates.command
。两项操作均成功完成,但我仍然收到相同的错误。我正在使用Python 3.6.8和MacOs 10.15.7
来自的输出pip install certifi
:
Requirement already up-to-date: certifi in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (2020.11.8)
-- removing any existing file or link
-- creating symlink to certifi certificate bundle
-- setting permissions
-- update complete
提前致谢
将来可能与谁有关:
我能够找到此问题的根本原因-我正在使用代理(Zscaler),该代理导致CA证书出现问题。禁用代理后,我可以顺利运行代码