astrorama / SourceXtractorPlusPlus

SourceXtractor++, the next generation SExtractor
https://astrorama.github.io/SourceXtractorPlusPlus/
GNU Lesser General Public License v3.0
73 stars 9 forks source link

Fails to install properly in a Conda environment #548

Closed gcongedo closed 1 year ago

gcongedo commented 1 year ago

I am following the user manual / readme to install sourcextractor++ in a freshly created miniconda environment (Ubuntu 20.04). I have tried the 0.19 and 0.18 versions, but in either case sourcextractor++ fails to execute as it complains about missing shared libraries.

On 0.19: sourcextractor++: error while loading shared libraries: libre2.so.9: cannot open shared object file: No such file or directory

On 0.18: sourcextractor++: error while loading shared libraries: libonnxruntime.so.1.12.0: cannot open shared object file: No such file or directory

I suspect this is a packaging issue. Does anybody have had experience with this and whether there's a workaround that might work?

Many thanks for your help.

marcschefer commented 1 year ago

Something has changed in the conda dependencies, either this library (re2) wasn't needed before or it's no longer installed automatically. For 0.18 and onnx we need a specific version of onnx, this was fixed so that it's no longer necessary with the 0.19 package.

Temporary work around: Using the command conda install re2 after activating the conda environment should fix the 0.19 install.

mkuemmel commented 1 year ago

I can confirm that this works also for me, and I a test run with this SE++ is going fine.

gcongedo commented 1 year ago

Thanks so much for helping. Unfortunately, that didn't work for me. This is what I did. Firstly, I tried to install re2 on the preexisting environment and it said that the package was already present, meaning that it is picked up when installing sourcextractor++. Then I started from scratch, but installed re2 before installing sourcextractor++ and it failed with the same error:

sourcextractor++: error while loading shared libraries: libre2.so.9: cannot open shared object file: No such file or directory

mkuemmel commented 1 year ago

@gcongedo what @marcschefer suggested and I could reproduce is the other way around:

Then we both got SE++ running, and it also runs when loading this environment later in different shells and so on.

gcongedo commented 1 year ago

Yes, that's precisely what I tried first:

$ conda install re2
Collecting package metadata (current_repodata.json): done
Solving environment: done

# All requested packages already installed.
marcschefer commented 1 year ago

Could you please try conda install re2==2022.04.01 maybe you have a different version installed?

gcongedo commented 1 year ago

That specific version works, thank you very much!

marcschefer commented 1 year ago

Fixed with 0.19.2