Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation issue : ImportError: libGL.so.1: cannot open shared object file: No such file or directory #41

Closed
nitschkematthew opened this issue Jan 6, 2021 · 3 comments

Comments

@nitschkematthew
Copy link

Hello! I am having a go at getting PyMeshLab installed on Windows Subsystem for Linux

python3 -m pip install git+https://github.com/cnr-isti-vclab/PyMeshLab
Collecting git+https://github.com/cnr-isti-vclab/PyMeshLab
  Cloning https://github.com/cnr-isti-vclab/PyMeshLab to /tmp/pip-req-build-0rtmh9ms
Requirement already satisfied: numpy in ./miniconda3/lib/python3.7/site-packages (from pymeshlab==0.1.7) (1.19.5)
Building wheels for collected packages: pymeshlab
  Building wheel for pymeshlab (setup.py) ... done
  Created wheel for pymeshlab: filename=pymeshlab-0.1.7-cp37-cp37m-manylinux1_x86_64.whl size=42164894 sha256=57b54d26ae2d71d39f8e11f7354b5ef47a2bed3a73bb900e816a0ec4a65483f2
  Stored in directory: /tmp/pip-ephem-wheel-cache-hwq1h23n/wheels/3d/56/5b/3748b9bd933db981a8d029588cc6efdd11ed37fb00906abf6b
Successfully built pymeshlab
Installing collected packages: pymeshlab
Successfully installed pymeshlab-0.1.7

Everything seems to install fine - however when I try to load the module I get the following error:

python3
>>> import pymeshlab as ml
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/matt/miniconda3/lib/python3.7/site-packages/pymeshlab/__init__.py", line 1, in <module>
    from .pmeshlab import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

and here is a test example of the errors using pytest

pytest --pyargs pymeshlab
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.7.3, pytest-6.2.1, py-1.10.0, pluggy-0.13.1
rootdir: /home/matt
collected 0 items / 18 errors

===================================================================================================== ERRORS ======================================================================================================
___________________________________________________ ERROR collecting miniconda3/lib/python3.7/site-packages/pymeshlab/tests/test_colorize_geodesic_distance.py ____________________________________________________
ImportError while importing test module '/home/matt/miniconda3/lib/python3.7/site-packages/pymeshlab/tests/test_colorize_geodesic_distance.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
miniconda3/lib/python3.7/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
miniconda3/lib/python3.7/site-packages/pymeshlab/__init__.py:1: in <module>
    from .pmeshlab import *
E   ImportError: libGL.so.1: cannot open shared object file: No such file or directory

Do you have any suggestions for how I can get this running?

Thanks!

@ghost
Copy link

ghost commented Jan 6, 2021

Based on the error message, it looks like you are missing the graphics library libGL.

If you're on Ubuntu, you can get it with apt update && apt install --yes libgl1-mesa-dev

It's a dependency the developers are aware of, see the discussion here

@nitschkematthew
Copy link
Author

Able to import pymeshlab and all pytests pass after installation of libGL.

Thank you!

@bryanbocao
Copy link

I fixed it by

sudo apt-get install python3-opencv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants