Q: What if I can 'pip install' visualdl but cannot find the module while running it?
A: It could be due to the mismatch of the locations from 'python' and 'pip'. For example, a user could install visualdl here:
[develop]$ pip show visualdl
Name: visualdl
Version: 1.0.0
Summary: Visualize Deep Learning
Home-page: UNKNOWN
Author: PaddlePaddle and Echarts team
Author-email: UNKNOWN
License: Apache License
Location: /usr/local/lib/python2.7/site-packages
Requires: Flask, Pillow, numpy, protobuf, scipy
But his/her python is actually here:
[develop]$ which python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
So when running visualdl, the system would look for the visualdl command in 2.7/lib/python2.7/site-packages/
One hacky solution is to simply copy the installed files at the pip location to the python location:
cp -r /usr/local/lib/python2.7/site-packages/visualdl /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/
A more stable suggestion is to use Anaconda's virtual environment and its python to do the installation.
Q: I got an 'Abort trap : 6' error while running visualdl, how to fix it?
A: It is because the system cannot find where 'visualdl' is. If you type python -c 'import visualdl'
, it should give you a module-not-found error. Try to setup visualdl locally from a conda environment. After installing, pip show visualdl
should show something like below:
Name: visualdl
Version: 1.0.0
Summary: Visualize Deep Learning
Home-page: UNKNOWN
Author: PaddlePaddle and Echarts team
Author-email: UNKNOWN
License: Apache License
Location: /Users/<username>/anaconda2/envs/conda_vdl/lib/python2.7/site-packages
Requires: Pillow, protobuf, Flask, scipy, numpy
In this case, the 'visualdl' command should be able to be found.