Closed agosztolai closed 2 months ago
Hi @agosztolai,
We have run into this ourselves recently due to this change in the opencv
package being pulled in:
https://github.com/conda-forge/opencv-feedstock/issues/401
which no longer comes shipped with required GUI libraries. This causes issues on Linux machines, but there is a quick fix.
The SLEAP package is very intertwined with it's GUI code (hence why we are slowly but surely modularizing parts into their own packages - see sleap-io and sleap-nn). Even if you do not need the GUI, you will need to install the following packages: https://github.com/talmolab/sleap/blob/dc78ee842774777d6645d6951a008761d78744ce/.github/workflows/ci.yml#L69-L70
Let us know if you run into any trouble.
Thanks, Liezl
Hi Liezl,
Thank you for the feedback. Unfortunately, I do not have sudo access on the server so I cannot run the commands that you suggest.
I have tried finding these packages compatible with conda environments, installed them, namely
https://anaconda.org/anaconda/mesa-libegl-devel-cos6-x86_64 https://anaconda.org/conda-forge/mesa-libglapi-cos7-x86_64 https://anaconda.org/conda-forge/mesalib https://anaconda.org/conda-forge/libopengl
However, this didn’t help.
I also want to note that the problem seem to be not only with CV2, but Qt too. For example, installing pip install opencv-python-headless solves the issue with opencv. But the Qt is still looking for the libel.so.1 library, which I am not able to resolve.
Best, Adam
On 28.08.2024, at 20:24, Liezl Maree @.***> wrote:
Hi @agosztolai https://github.com/agosztolai,
We have run into this ourselves recently due to this change in the opencv package being pulled in: conda-forge/opencv-feedstock#401 https://github.com/conda-forge/opencv-feedstock/issues/401 which no longer comes shipped with required GUI libraries. This causes issues on Linux machines, but there is a quick fix.
The SLEAP package is very intertwined with it's GUI code (hence why we are slowly but surely modularizing parts into their own packages - see sleap-io https://github.com/talmolab/sleap-io and sleap-nn https://github.com/talmolab/sleap-nn). Even if you do not need the GUI, you will need to install the following packages: https://github.com/talmolab/sleap/blob/dc78ee842774777d6645d6951a008761d78744ce/.github/workflows/ci.yml#L69-L70
Let us know if you run into any trouble.
Thanks, Liezl
— Reply to this email directly, view it on GitHub https://github.com/talmolab/sleap/issues/1926#issuecomment-2315996671, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK6WK5DYNOIC7S4RIM26L4TZTYIXHAVCNFSM6AAAAABNIM6B56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJVHE4TMNRXGE. You are receiving this because you were mentioned.
Hi Adam,
I have two suggestions below and would try them one at a time starting with the first suggestion.
I also want to note that the problem seem to be not only with CV2, but Qt too. For example, installing pip install opencv-python-headless solves the issue with opencv. But the Qt is still looking for the libel.so.1 library, which I am not able to resolve.
The opencv and Qt packages are closely intertwined. The issue we are facing comes from this conda-forge issue:
where they basically released newer builds of the same version of opencv
that include qt6-main
as a dependency which means they also added OpenGL libraries to the opencv
package which seem to conflict with the packages that are needed with qt2 (which is what we are using). The previous build of SLEAP was released before they started adding these "breaking" opencv
packages and hence we do not have a constrain on the newer opencv
s yet, but are working on our new release in:
I have tried finding these packages compatible with conda environments, installed them, namely https://anaconda.org/anaconda/mesa-libegl-devel-cos6-x86_64 https://anaconda.org/conda-forge/mesa-libglapi-cos7-x86_64 https://anaconda.org/conda-forge/mesalib https://anaconda.org/conda-forge/libopengl However, this didn’t help.
Oof, ok, there is possibility that our environment might be a little wonky with these extras installed - would you be ok with recreating the environment first before trying new suggestions?
Unfortunately, I do not have sudo access on the server so I cannot run the commands that you suggest.
Sorry! I should have suggested the following first as "with great power comes great responsibility". Can you run
apt-get install libglapi-mesa libegl-mesa0 libegl1 libopengl0 libgl1-mesa-glx
without the sudo
?
Are you able to list the environment info with conda list
while you are in your sleap
environment. I am curious which opencv
is being used. I wonder if this can be resolved by uninstalling opencv
in your sleap
environment
conda uninstall opencv
and then reinstalling (constraining to a version of opencv
before the addition of the qt6-main
dependency)
conda install -c conda-forge "opencv<=4.8.1"
Sorry for the trouble. Please let us know how it goes.
Thanks, Liezl
Hi @agosztolai,
We have released SLEAP 1.3.4 (off https://github.com/talmolab/sleap/pull/1927) which adds additional dependency constraints to prevent this from happening.
If you are able, please upgrade to v1.3.4 and let us know if it solves your issue.
I am closing this for now, but if the problem persists, I will reopen the issue.
Thanks, Liezl
Hello,
I am trying to run SLEAP on a remote server that does not have displays installed.
I can install SLEAP without issues using conda. However, when I want to import sleap in python I get the following error.
Do you know how to resolve this issue? Can SLEAP be run in 'headless' mode?