yoavram / curveball

Predicting microbial growth in a mixed culture from growth curve data
http://curveball.yoavram.com
Other
14 stars 5 forks source link

Curveball import fails on headless machine #88

Closed yoavram closed 9 years ago

yoavram commented 9 years ago

Install works, but running or importing fails:

python -c "import curveball;print(curveball.__version__)"
...
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/root/miniconda/envs/curveball/lib/python3.4/site-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup
    globals(),locals(),[backend_name],0)
  File "/root/miniconda/envs/curveball/lib/python3.4/site-packages/matplotlib/backends/backend_qt4agg.py", line 17, in <module>
    from .backend_qt5agg import NavigationToolbar2QTAgg
  File "/root/miniconda/envs/curveball/lib/python3.4/site-packages/matplotlib/backends/backend_qt5agg.py", line 18, in <module>
    from .backend_qt5 import QtCore
  File "/root/miniconda/envs/curveball/lib/python3.4/site-packages/matplotlib/backends/backend_qt5.py", line 31, in <module>
    from .qt_compat import QtCore, QtGui, QtWidgets, _getSaveFileName, __version__
  File "/root/miniconda/envs/curveball/lib/python3.4/site-packages/matplotlib/backends/qt_compat.py", line 91, in <module>
    from PyQt4 import QtCore, QtGui
ImportError: libSM.so.6: cannot open shared object file: No such file or directory

If you first do import matplotlib;matplotlib.use('Agg') then it works.

yoavram commented 9 years ago

This doesn't happen on Travis-CI.

yoavram commented 9 years ago

You must install these dependencies (see conda/conda#1051):

apt-get install libsm6 libxrender1 libfontconfig1

Then try again:

>>> python -c "import curveball;print(curveball.__version__)"
0.1.10b+6.g3f02feb

Should add this to installation docs.