Following the instructions for installing from source, and the usage documentation.
pip install -e .
python -m visdom.server
No module named visdom.server
This makes sense, looking at the directory structure of the project. So... how do I run the server, having installed from master? The demo is pretty much useless running off of the pip-build.
Can you try easy_install .? Sometimes pip doesn't install to the correct location based on your python setup. You should ensure that which pip and which python are pointed in the same location. Other times pip install -e is unreliable with no real explanation...
That seemed to address the problem... however now I am missing a dependency. Does easy_install not handle this? Anyway. pip-installing websocket seemed to do the trick! Thank you!
pip uninstall visdom
easy_install .
Installed /home/ry26099/anaconda3/lib/python3.6/site-packages/visdom-0.1.7.2-py3.6.egg
Processing dependencies for visdom==0.1.7.2
Finished processing dependencies for visdom==0.1.7.2
python -m visdom.server
Traceback (most recent call last):
File "/home/ry26099/anaconda3/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/home/ry26099/anaconda3/lib/python3.6/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/home/ry26099/anaconda3/lib/python3.6/site-packages/visdom-0.1.7.2-py3.6.egg/visdom/__init__.py", line 16, in <module>
import websocket
ModuleNotFoundError: No module named 'websocket'
python demo.py
Socket had error module 'websocket' has no attribute 'WebSocketApp', attempting restart
The visdom experienced an exception while running:
The demo displays up-to-date functionality with the GitHub version, which may not yet be pushed to pip. Please upgrade usingpip install -e .oreasy_install .
If this does not resolve the problem, please open an issue on our GitHub.
I installed websocket via pip install websocket. Am I doing something wrong here?
Can you use pip install websocket-client instead? I should probably have included that into the build requirements when I added websocket - totally forgot, my bad!
(For some reason when they forked the websocket project the more up-to-date one ended up being the one with the longer awkward name)
Installed websocket-client with pip install websocket-client
visdom 0.1.7.2 <pip>
websocket-client 0.47.0 <pip>
And the server launches nicely:
python -m visdom.server
Downloading scripts. It might take a while.
It's Alive!
INFO:root:Application Started
You can navigate to http://localhost:8097
But now I hit an opaque issue with the demo.
python visdom/example/demo.py
The visdom experienced an exception while running:
The demo displays up-to-date functionality with the GitHub version, which may not yet be pushed to pip. Please upgrade usingpip install -e .oreasy_install .
If this does not resolve the problem, please open an issue on our GitHub.
On the server-end, I see
INFO:tornado.access:304 GET / (127.0.0.1) 10.21ms
INFO:tornado.access:101 GET /socket (127.0.0.1) 0.34ms
INFO:root:Opened new socket from ip: 127.0.0.1
INFO:tornado.access:200 POST /env/main (127.0.0.1) 0.40ms
INFO:tornado.access:200 POST /win_exists (127.0.0.1) 0.24ms
INFO:tornado.access:101 GET /vis_socket (127.0.0.1) 0.18ms
INFO:root:Opened visdom socket from ip: 127.0.0.1
Sorry about this, I realize that I am working off the bleeding edge. I just wanted to get a better vibe for how to make use of the tool via the demo. This looks like a great project!
Don't worry about the bother - it's important to be able to tell what's up! If anything we want people to upgrade and try the demo on the bleeding edge before we release on pip so that we're sure things are running properly. Not sure why the demo error-ed out without telling you what happened. Is there anything in your visdom window at all?
Can you import sys at the top of the demo and call print(sys.exc_info()[0]) as the first line of the except block near the bottom? That should actually let us know what you're dealing with.
_Edit:_ Even better, replace the format(e) call in the last line of the demo file with format(repr(e))
This is really really odd. I got it to work by...trying to run the demo repeatedly
python visdom/example/demo.py
The visdom experienced an exception while running:
The demo displays up-to-date functionality with the GitHub version, which may not yet be pushed to pip. Please upgrade usingpip install -e .oreasy_install .
If this does not resolve the problem, please open an issue on our GitHub.
python visdom/example/demo.py
The visdom experienced an exception while running:
The demo displays up-to-date functionality with the GitHub version, which may not yet be pushed to pip. Please upgrade usingpip install -e .oreasy_install .
If this does not resolve the problem, please open an issue on our GitHub.
Then... it suddenly works!
python visdom/example/demo.py
Skipped video example
Waiting for callbacks, press enter to quit.
And stops again
python visdom/example/demo.py
The visdom experienced an exception while running:
The demo displays up-to-date functionality with the GitHub version, which may not yet be pushed to pip. Please upgrade usingpip install -e .oreasy_install .
If this does not resolve the problem, please open an issue on our GitHub.
This is the culprit: assert viz.check_connection()
Ah okay I've found the issue - pushing a fix to the demo. Visdom isn't waiting long enough to establish a socket before it runs the demo
Alright putting the change in now, but it could take a little bit to push through our pipeline. Replace the assert with:
startup_sec = 1
while not viz.check_connection() and startup_sec > 0:
time.sleep(0.1)
startup_sec -= 0.1
assert viz.check_connection(), 'No connection could be formed quickly'
if you want to run the demo with no issues right now (that's the extent of the change)
Thanks for reaching out about this!
Thank you! I'm planning to make my liveplot (which is very young, but really useful) project support visdom , instead of solely matplotlib.