Are iris and swrast dependencies that are supposed to be installed with vtk? How can I ensure that these get installed on my students’ machine and they do not encounter this?
Thank you for the response. I needed to check to see if this problem exists on Windows and Mac OSX too. Vtk installed on those platforms easily with only a pip install vtk.
I did an apt install of the libgl1-mesa-dri library and also did a conda install mesalib but the problem was not solved. Do they need to be installed in a particular way? I did not see this dependency listed on the install page. Can you tell me more about how to install this dependency?
The VTK pypi package for pip and the VTK conda package are different things. The pypi package is released by Kitware, while the conda package is maintained by a different group: https://github.com/conda-forge/vtk-feedstock
I’ve installed VTK on linux via pip (no conda) without needing to install any dependencies. I don’t use conda, so I don’t know much about its VTK package.
Ah! Ok! Good to know. I tried installing with pip first, then went to conda thinking that it was the same or more comprehensive of an installation process.
That being the case, I started a fresh environment (Python 3.9) and installed vtk (9.2.2) with pip install vtk.
However, I am still getting the same error:
libGL error: MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
2022-12-12 07:41:34.443 ( 0.032s) [ 5FD7D740]vtkXOpenGLRenderWindow.:651 ERR| vtkXOpenGLRenderWindow (0x156de40): Cannot create GLX context. Aborting.
[1] 9946 IOT instruction (core dumped) python -m hello_world
Are these dependencies expected to be in the OS already? Is there documentation for these dependencies and their installation?
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================-=====================================-============-====================================================
ii libgl1-mesa-dri:amd64 22.2.0-1pop0~1664294850~22.04~4e1b64f amd64 free implementation of the OpenGL API -- DRI modules
If you use the pip package, then make sure that your environment doesn’t have any conda-specific paths or environment variables (type env in your shell to check what vars are set).
Since you’re seeing dependency errors for libs and you’ve verified that those libs are installed on your system, I suspect that conda-installed libraries are somehow interfering with your system libraries. You can use ldd to see what’s linked, for example: