PyTorch visdom 运行报错ERROR:root:Error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed

报错:

➜  ~ visdom
Downloading scripts. It might take a while.
ERROR:root:Error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777) while downloading https://unpkg.com/[email protected]/dist/jquery.min.js
ERROR:root:Error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777) while downloading https://unpkg.com/[email protected]/dist/js/bootstrap.min.js
ERROR:root:Error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777) while downloading https://unpkg.com/[email protected]/umd/react.production.min.js
...

Solution:

打开 server.py文件

/Users/xxx/Library/Python/3.6/lib/python/site-packages/visdom/server.py

在 server.py文件头,添加如下代码:

import ssl
ssl._create_default_https_context = ssl._create_unverified_context

 

你可能感兴趣的:(PyTorch visdom 运行报错ERROR:root:Error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed)