python 3.6下安装visdom

1 安装visdom

pip install visdom

2 启动vidom 

python  -m visdom.server

如果此时卡在downloading 

(1) C:\Python3.6\Lib\site-packages\visdom\server.py  在download_scripts()添加打印下载所需文件的代码

记录需要下载的文件如下:

https://unpkg.com/jquery@3.1.1/dist/jquery.min.js
https://unpkg.com/bootstrap@3.3.7/dist/js/bootstrap.min.js
https://unpkg.com/react@16.2.0/umd/react.production.min.js
https://unpkg.com/react-dom@16.2.0/umd/react-dom.production.min.js
https://unpkg.com/react-modal@3.1.10/dist/react-modal.min.js
https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_SVG
https://cdn.plot.ly/plotly-latest.min.js
https://unpkg.com/sjcl@1.0.7/sjcl.js
https://unpkg.com/react-resizable@1.4.6/css/styles.css
https://unpkg.com/react-grid-layout@0.16.3/css/styles.css
https://unpkg.com/bootstrap@3.3.7/dist/css/bootstrap.min.css
https://unpkg.com/classnames@2.2.5
https://unpkg.com/layout-bin-packer@1.4.0/dist/layout-bin-packer.js
https://unpkg.com/bootstrap@3.3.7/dist/fonts/glyphicons-halflings-regular.eot
https://unpkg.com/bootstrap@3.3.7/dist/fonts/glyphicons-halflings-regular.woff2
https://unpkg.com/bootstrap@3.3.7/dist/fonts/glyphicons-halflings-regular.woff
https://unpkg.com/bootstrap@3.3.7/dist/fonts/glyphicons-halflings-regular.ttf
https://unpkg.com/bootstrap@3.3.7/dist/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular

使用迅雷下载下文件后按照  download_scripts()函数要求改的名字,把下载的文件改成正确的名字,代码中冒号后面的名字

  把文件拷贝到C:\Python3.6\Lib\site-packages\visdom的static文件夹下

(2)注释掉C:\Python3.6\Lib\site-packages\visdom\server.py 文件下的 download_scripts(),并在如下图

    

 

 

3 python  -m visdom.server 再次启动

在浏览器输入http://localhost:8097/ 访问

4 或者修改server.py的下载代码,将request.Request修改为下面的方式

 from six.moves.urllib import request

 request.urlretrieve("https://unpkg.com/bootstrap@3.3.7/dist/css/bootstrap.min.css","D:/xx.css")

 

 

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值