Closed FlurinArner closed 5 months ago
Tested with Docker version 26.1.3, build b72abbb
:
docker build -t venv_test .
venv_test
) with docker run -it --rm venv_test bash
source .venv/bin/activate; pip install klampt; python -c "import klampt"
As is, no errors occurred, all is good (at least for now, just for importing klampt). If the line with qtbase5-dev
is commented out, ImportErrors occur.
P.S. the 'venv activation' is not strictly necessary in all scenarios, but causes issues with Ubuntu 23+ when executing pip install ...
Thanks for pointing this out, I'll update the docs!
Upon further investigation, as I was solving unrelated issues, I noticed it's enough to install the necessary libraries:
apt-get install libopengl0 libgl1-mesa-glx
(maybe with sudo
at the beginning)Or in a Dockerfile
format as above:
RUN DEBIAN_FRONTEND="noninteractive" apt-get install --no-install-recommends --yes libopengl0 libgl1-mesa-glx
I faced following ImportError while installing with
pip install klampt
ImportError: libOpenGL.so.0: cannot open shared object file: No such file or directory
So I decided to replicate the issue on
Ubuntu 22.04
,Ubuntu 24.04
,Python3.10
andPython3.12
(both based on Debian bookworm) with the following dockerfile:In all cases (select any of the first 4 lines), if
qtbase5-dev
was not installed, I would encounter the missinglibOpenGL.so.0
.I tried with a few other dependencies from the dependency list mentioned in the building from source manual, but nothing solved the issue like
qtbase5-dev
(which is somewhat a replacement for the obsoleteqt5-default
package).I'm not sure what the solution to this problem would be. Do these packages need to be installed system-wide? Would it suffice to add some "warning" if after doing
pip install klampt
the necessary libraries are installed?