examples.pytest.test_python.test_python1

Tags
Last edited time

Error Message

ImportError: libOpenGL.so.0: cannot open shared object file: No such file or directory

Stacktrace

def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_opengl')).lstrip('.')
        try:
>           return importlib.import_module(mname)

../lib/python3.7/site-packages/ccp4mg/opengl.py:14:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

name = '_opengl', package = None

    def import_module(name, package=None):
        """Import a module.

        The 'package' argument is required when performing a relative import. It
        specifies the package to use as the anchor point from which to resolve the
        relative import to an absolute import.

        """
        level = 0
        if name.startswith('.'):
            if not package:
                msg = ("the 'package' argument is required to perform a relative "
                       "import for {!r}")
                raise TypeError(msg.format(name))
            for character in name:
                if character != '.':
                    break
                level += 1
>       return _bootstrap._gcd_import(name[level:], package, level)

../lib/python3.7/importlib/__init__.py:127:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

name = '_opengl', package = None, level = 0

>   ???

<frozen importlib._bootstrap>:1006:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

name = '_opengl', import_ = <function _gcd_import at 0x7fe030150b00>

>   ???

<frozen importlib._bootstrap>:983:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

name = '_opengl', import_ = <function _gcd_import at 0x7fe030150b00>

>   ???

<frozen importlib._bootstrap>:967:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

spec = ModuleSpec(name='_opengl', loader=<_frozen_importlib_external.ExtensionFileLoader object at 0x7fdff5029390>, origin='/...ace/CCP4/test-release-linux64/ccp4-8.0/lib/python3.7/site-packages/ccp4mg/lib/_opengl.cpython-37m-x86_64-linux-gnu.so')

>   ???

<frozen importlib._bootstrap>:670:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

spec = ModuleSpec(name='_opengl', loader=<_frozen_importlib_external.ExtensionFileLoader object at 0x7fdff5029390>, origin='/...ace/CCP4/test-release-linux64/ccp4-8.0/lib/python3.7/site-packages/ccp4mg/lib/_opengl.cpython-37m-x86_64-linux-gnu.so')

>   ???

<frozen importlib._bootstrap>:583:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_frozen_importlib_external.ExtensionFileLoader object at 0x7fdff5029390>
spec = ModuleSpec(name='_opengl', loader=<_frozen_importlib_external.ExtensionFileLoader object at 0x7fdff5029390>, origin='/...ace/CCP4/test-release-linux64/ccp4-8.0/lib/python3.7/site-packages/ccp4mg/lib/_opengl.cpython-37m-x86_64-linux-gnu.so')

>   ???

<frozen importlib._bootstrap_external>:1043:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

f = <built-in function create_dynamic>
args = (ModuleSpec(name='_opengl', loader=<_frozen_importlib_external.ExtensionFileLoader object at 0x7fdff5029390>, origin='...e/CCP4/test-release-linux64/ccp4-8.0/lib/python3.7/site-packages/ccp4mg/lib/_opengl.cpython-37m-x86_64-linux-gnu.so'),)
kwds = {}

>   ???
E   ImportError: libOpenGL.so.0: cannot open shared object file: No such file or directory

<frozen importlib._bootstrap>:219: ImportError

During handling of the above exception, another exception occurred:

    def test_python1():
        import os
        import sys
        import sqlite3 # needed by ccp4i2
        import zipfile # needed by ccp4i2
        import warnings

        import cctbx
        import iotbx.pdb
        import ccp4io_adaptbx
        from scitbx.array_family import flex

        print( 'SYMINFO from ccp4io_adaptbx:', os.environ['SYMINFO'])

        print( 'sys.version:')
        print( sys.version)
        ccp4=os.getenv('CCP4')
        print( "sys.path: " + "\n ".join(p.replace(ccp4, '\$CCP4') for p in sys.path))

        # check that we have modules required by ccp4i2/MG
        import suds
        from lxml import etree

        if sys.version_info[0] >= 3:
            from PyQt5 import QtCore, QtGui
            from PySide2 import QtGui, QtWidgets, QtCore, QtWebEngineWidgets
        else:
            from PyQt4 import QtCore, QtGui, QtOpenGL, QtSql, QtWebKit, QtSvg

        import numpy
        m = numpy.dot(numpy.random.randn(5,5), numpy.random.randn(5,5))
        import scipy.cluster.vq
        scipy.cluster.vq.kmeans(m, 2)
        import sip
        from pylab import cm # tries default backend
        from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg
        from matplotlib.backends.backend_pdf import PdfPages
        from matplotlib.font_manager import FontProperties

        # avoid RuntimeWarning about converter for std::vector<> already registered
        with warnings.catch_warnings():
          warnings.simplefilter("ignore")
          from rdkit import Chem
        assert Chem.MolFromSmiles("C1OC1").GetNumAtoms() == 3

        # a few modules from ccp4mg
        import ccp4mg
        import hklfile
>       import opengl

../examples/pytest/test_python.py:54:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../lib/python3.7/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py:142: in _import
    return original_import(name, *args, **kwargs)
../lib/python3.7/site-packages/ccp4mg/opengl.py:17: in <module>
    _opengl = swig_import_helper()
../lib/python3.7/site-packages/ccp4mg/opengl.py:16: in swig_import_helper
    return importlib.import_module('_opengl')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

name = '_opengl', package = None

    def import_module(name, package=None):
        """Import a module.

        The 'package' argument is required when performing a relative import. It
        specifies the package to use as the anchor point from which to resolve the
        relative import to an absolute import.

        """
        level = 0
        if name.startswith('.'):
            if not package:
                msg = ("the 'package' argument is required to perform a relative "
                       "import for {!r}")
                raise TypeError(msg.format(name))
            for character in name:
                if character != '.':
                    break
                level += 1
>       return _bootstrap._gcd_import(name[level:], package, level)
E       ImportError: libOpenGL.so.0: cannot open shared object file: No such file or directory

../lib/python3.7/importlib/__init__.py:127: ImportError

Standard Output

SYMINFO from ccp4io_adaptbx: /home/jenkins/workspace/CCP4/test-release-linux64/ccp4-8.0/lib/python3.7/site-packages/ccp4io/libccp4/data/syminfo.lib
sys.version:
3.7.12 (default, Jan  6 2022, 21:30:12)
[GCC 8.2.1 20180905 (Red Hat 8.2.1-3)]
sys.path: \$CCP4/examples/pytest
 \$CCP4/test
 \$CCP4/lib/python3.7/site-packages/phaser
 \$CCP4/lib/python3.7/site-packages/tntbx
 \$CCP4/lib/python3.7/site-packages
 \$CCP4/lib/python3.7/site-packages/cctbx_project
 \$CCP4/lib/python3.7/site-packages/cctbx_project/boost_adaptbx
 \$CCP4/lib/python3.7/site-packages/cctbx_project/libtbx/pythonpath
 \$CCP4/lib/python3.7/cctbx/lib
 \$CCP4/share/python
 \$CCP4/lib/python3.7/site-packages/dxtbx/src
 \$CCP4/lib/python37.zip
 \$CCP4/lib/python3.7
 \$CCP4/lib/python3.7/lib-dynload