运行代码时出现以下错误:
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /env/main (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fc861bd8e48>: Failed to establish a new connection: [Errno 111] Connection refused'))
1.检查是不是用到Visdom
2.检查是否运行了 python -m visdom.server
打开链接 http://localhost:8097
3.再打开一个命令窗口,输入自己所需的命令
比如这里,输入以下命令进行测试:
import visdom
vis = visdom.Visdom()