Importing gmsh gives OSError

263 Views Asked by At

I'm trying to import the gmsh python package but getting the following error. I installed gmsh using mamba install python-gmsh (which I got from here) inside Ubuntu but I'm importing the module within Pycharm on Windows using WSL.

File "/home/mai/mambaforge/envs/myenv/lib/python3.9/site-packages/gmsh.py", line 86, in <module>
    lib = CDLL(libpath)
  File "/home/mai/mambaforge/envs/myenv/lib/python3.9/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libGL.so.1: cannot open shared object file: No such file or directory

I've installed gmsh previously using mamba and it worked but this time it's giving issues.

Edit: I found out it was because I was missing OpenGL. It comes preinstalled on Windows/Linux but not with WSL it seems.

0

There are 0 best solutions below