# PIP packages with EGL?

**URL:** <https://discourse.vtk.org/t/pip-packages-with-egl/9745>\
**Category:** Support\
**Created:** [November 6, 2022, 1:25pm UTC](https://discourse.vtk.org/t/pip-packages-with-egl/9745 "2022-11-06T13:25:45Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ingmar](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/i/cc9497/32.png) [@Ingmar](https://discourse.vtk.org/u/Ingmar)\
**Post date:** [November 6, 2022, 1:25pm UTC](https://discourse.vtk.org/t/pip-packages-with-egl/9745/1 "2022-11-06T13:25:45Z")

</div>

I am using VTK offscreen rendering with EGL via [Files :: Anaconda.org](https://anaconda.org/conda-forge/vtk/files) (e.g. linux-64/vtk-9.2.2-egl\_py38h6ab77d2\_4.tar.bz2), which works great.

However sometimes I would also like to set this up via pip, however AFAIK [vtk · PyPI](https://pypi.org/project/vtk) does not seem to include EGL - are there any plans to push the same packages also to pip?

As a background: some things are just a pain to setup with Conda because of the broken dependency solver (e.g. it complians SimpleITK would be “conflicting” with many other packages, which is not actually true) and the new “mamba” solver is still in development. I never saw such issues with pip, so it would be great to get VTK with EGL this way too. For now I am working around with different python envs, which is a poor mans solution …

---

<div class="post-metadata">

**Author:** ![Ingmar](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/i/cc9497/32.png) [@Ingmar](https://discourse.vtk.org/u/Ingmar)\
**Post date:** [November 7, 2022, 1:07pm UTC](https://discourse.vtk.org/t/pip-packages-with-egl/9745/2 "2022-11-07T13:07:09Z")

</div>

@jcfr @ben.boeckel your are the maintainers of [vtk · PyPI](https://pypi.org/project/vtk), right? Any plans for a pip release including EGL? Thanks!

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)\
**Post date:** [November 7, 2022, 5:06pm UTC](https://discourse.vtk.org/t/pip-packages-with-egl/9745/3 "2022-11-07T17:06:30Z")

</div>

It’s been discussed, yes. Not on a schedule AFAIK though.

Cc: @Sebastien_Jourdain @banesullivan

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)\
**Post date:** [November 7, 2022, 5:07pm UTC](https://discourse.vtk.org/t/pip-packages-with-egl/9745/4 "2022-11-07T17:07:28Z")

</div>

Also, not sure about a PyPI release; it might have to be on a Kitware repo because of symbol conflict problems (AFAIK, we’d have to ship a Mesa build which I imagine crashes and burns if some other package tries to load a “real” OpenGL).

---

<div class="post-metadata">

**Author:** ![banesullivan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/banesullivan/32/7143_2.png) [@banesullivan](https://discourse.vtk.org/u/banesullivan)\
**Post date:** [November 7, 2022, 6:44pm UTC](https://discourse.vtk.org/t/pip-packages-with-egl/9745/5 "2022-11-07T18:44:49Z")

</div>

Ping me in about 3 months and I think we may have something worked out for this.

In the meantime, I have been building OSMesa and EGL wheel variants manually. I have some hosted [here](https://github.com/Kitware/pan3d/tree/main/wheels) and some (work in progress) scripts to build them [here](https://github.com/pyvista/pyvista-wheels/pull/9). These are very unofficial and are just what I’m using right now

---

<div class="post-metadata">

**Author:** ![Ingmar](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/i/cc9497/32.png) [@Ingmar](https://discourse.vtk.org/u/Ingmar)\
**Post date:** [February 27, 2023, 6:37pm UTC](https://discourse.vtk.org/t/pip-packages-with-egl/9745/6 "2023-02-27T18:37:25Z")

</div>

@banesullivan 3 months are over - any updates? 🙂

---

<div class="post-metadata">

**Author:** ![banesullivan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/banesullivan/32/7143_2.png) [@banesullivan](https://discourse.vtk.org/u/banesullivan)\
**Post date:** [March 1, 2023, 6:49pm UTC](https://discourse.vtk.org/t/pip-packages-with-egl/9745/7 "2023-03-01T18:49:24Z")

</div>

Thanks for the reminder, @Ingmar! I’ve posted in a few places about the recent publishing of OSMesa wheels:

- [Availability of `vtkImageResliceMapper` in `pvpython` · Kitware/trame · Discussion #193 · GitHub](https://github.com/Kitware/trame/discussions/193#discussioncomment-4834848)

Unfortunately, we are not publishing EGL variants at this time but I have created some CMake configurations that make the process of building these wheels relatively straightforward: [GitHub - banesullivan/vtk-cmake: CMake configurations for how I like to build VTK](https://github.com/banesullivan/vtk-cmake)

---

<div class="post-metadata">

**Author:** ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)\
**Post date:** [March 11, 2024, 9:16pm UTC](https://discourse.vtk.org/t/pip-packages-with-egl/9745/8 "2024-03-11T21:16:55Z")

</div>

`pip install --extra-index-url https://wheels.vtk.org vtk-egl`

---

<div class="post-metadata">

**Author:** ![Ingmar](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/i/cc9497/32.png) [@Ingmar](https://discourse.vtk.org/u/Ingmar)\
**Post date:** [March 19, 2024, 11:23am UTC](https://discourse.vtk.org/t/pip-packages-with-egl/9745/9 "2024-03-19T11:23:18Z")

</div>

thank you @Sebastien_Jourdain !

What would be the best way of searching [https://wheels.vtk.org](https://wheels.vtk.org)?  
It looks minified in the browser (“only” the API responds) and `pip search --index https://wheels.vtk.org vtk` fails with:

```auto
ERROR: Exception:
Traceback (most recent call last):
  File "C:\Users\e04004t0\AppData\Roaming\Python\Python39\site-packages\pip\_internal\network\xmlrpc.py", line 50, in request
    raise_for_status(response)
  File "C:\Users\e04004t0\AppData\Roaming\Python\Python39\site-packages\pip\_internal\network\utils.py", line 54, in raise_for_status
    raise NetworkConnectionError(http_error_msg, response=resp)
pip._internal.exceptions.NetworkConnectionError: 404 Client Error: Not Found for url: https://pypi.org/simple/RPC2/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\e04004t0\AppData\Roaming\Python\Python39\site-packages\pip\_internal\cli\base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
  File "C:\Users\e04004t0\AppData\Roaming\Python\Python39\site-packages\pip\_internal\commands\search.py", line 57, in run
    pypi_hits = self.search(query, options)
  File "C:\Users\e04004t0\AppData\Roaming\Python\Python39\site-packages\pip\_internal\commands\search.py", line 77, in search
    hits = pypi.search({"name": query, "summary": query}, "or")
  File "E:\UserData\e04004t0\python-caches\conda\envs\USValves\lib\xmlrpc\client.py", line 1122, in __call__
    return self.__send(self.__name, args)
  File "E:\UserData\e04004t0\python-caches\conda\envs\USValves\lib\xmlrpc\client.py", line 1464, in __request
    response = self.__transport.request(
  File "C:\Users\e04004t0\AppData\Roaming\Python\Python39\site-packages\pip\_internal\network\xmlrpc.py", line 54, in request
    assert exc.response
AssertionError

```

---

<div class="post-metadata">

**Author:** ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)\
**Post date:** [March 19, 2024, 5:34pm UTC](https://discourse.vtk.org/t/pip-packages-with-egl/9745/10 "2024-03-19T17:34:00Z")

</div>

It is an alias to [https://gitlab.kitware.com/vtk/vtk/-/packages](https://gitlab.kitware.com/vtk/vtk/-/packages)

---

<div class="post-metadata">

**Author:** ![Ingmar](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/i/cc9497/32.png) [@Ingmar](https://discourse.vtk.org/u/Ingmar)\
**Post date:** [March 22, 2024, 12:30pm UTC](https://discourse.vtk.org/t/pip-packages-with-egl/9745/11 "2024-03-22T12:30:58Z")

</div>

@Sebastien_Jourdain the vtk-egl installation fails on my end with

```auto
ERROR: Could not find a version that satisfies the requirement vtk-egl (from versions: none)
ERROR: No matching distribution found for vtk-egl

```

On the same machine I am able to install `vtk` and `vtk-osmesa` packages

It is for Python 3.9.19 on CentOS Linux release 7.9.2009 (Core) - should I try with a more recent python version?

---

<div class="post-metadata">

**Author:** ![Ingmar](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/i/cc9497/32.png) [@Ingmar](https://discourse.vtk.org/u/Ingmar)\
**Post date:** [March 22, 2024, 12:45pm UTC](https://discourse.vtk.org/t/pip-packages-with-egl/9745/12 "2024-03-22T12:45:58Z")

</div>

nevermind I realized CentOS 7 is simply old (according to [GitHub - pypa/manylinux: Python wheels that work on any linux (almost)](https://github.com/pypa/manylinux))

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)\
**Post date:** [April 27, 2024, 6:55pm UTC](https://discourse.vtk.org/t/pip-packages-with-egl/9745/13 "2024-04-27T18:55:46Z")

</div>

Yes, I had attempted to use the same `manylinux` as the `vtk` wheels, but Mesa/LLVM were just not happy with the available libraries/toolchains.
