libGL.so.1 shared object not found in docker

3,548 views
Skip to first unread message

Sam Murphy

unread,
Jun 18, 2017, 6:17:19 PM6/18/17
to Py6S
Hi Robin,

I tried to create a docker image with Py6S but it doesn't seem to find libGL.so.1. Installing from ubuntu packages was a fix but thought I should report this. Here is more or less what I was doing

$ docker run -i -t continuumio/miniconda3

root@containerId:/# conda config --add channels conda-forge
root@containerId:/# conda install py6s
root@containerId:/# python

>>> from Py6S import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/conda/lib/python3.6/site-packages/Py6S/__init__.py", line 30, in <module>
    from . import SixSHelpers
  File "/opt/conda/lib/python3.6/site-packages/Py6S/SixSHelpers/__init__.py", line 20, in <module>
    from .all_angles import *
  File "/opt/conda/lib/python3.6/site-packages/Py6S/SixSHelpers/all_angles.py", line 19, in <module>
    from matplotlib.pyplot import *
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/pyplot.py", line 115, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup
    globals(),locals(),[backend_name],0)
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/backend_qt5agg.py", line 16, in <module>
    from .backend_qt5 import QtCore
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/backend_qt5.py", line 26, in <module>
    import matplotlib.backends.qt_editor.figureoptions as figureoptions
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/qt_editor/figureoptions.py", line 20, in <module>
    import matplotlib.backends.qt_editor.formlayout as formlayout
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/qt_editor/formlayout.py", line 56, in <module>
    from matplotlib.backends.qt_compat import QtGui, QtWidgets, QtCore
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/qt_compat.py", line 128, in <module>
    from PyQt5 import QtCore, QtGui, QtWidgets
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

Sam Murphy

unread,
Jun 18, 2017, 11:09:39 PM6/18/17
to Py6S
for the record, installing this package resolved the issue for me:

apt-get install libgl1-mesa-glx
Reply all
Reply to author
Forward
0 new messages