how to fix import pygimli error libcholmod.so.3 on Mybinder
stefanazzz opened this issue · comments
Problem description
When trying to run from my Github repository using MyBinder,
import pygimli gives the following error:
"libcholmod.so.3: cannot open shared object file: No such file or directory (...)"
This can be fixed by adding python=3.8 to the yml environment file (see file below)
Your environment
from environment.yml file on github:
channels: - conda-forge - gimli - defaults dependencies: - python=3.8 <-- add this line to make "import pygimli" work correctly - pygimli>=1.1.0
Notes
I suppose that 1.1.0 is compatible only with 3.8 not more recent versions. Note that pygimli >=1.5.0 shows the same problem when compiled with the current (May 2024) default mybinder python 3.11.x. I tried a few combinations but so far only 1.1.0 and 3.8 seem to work on mybinder.
Can you try using pip install pygimli
instead?
Is #721 (comment) probably related?
Just to mention it here too: The same happens on Github Actions: While conda install -c gimli pygimli
does work, loading pygimli results in
ImportError: libcholmod.so.3: cannot open shared object file: No such file or directory
I just got hit by this even on my local machine (Ubuntu 22.04.4) with Python 3.11.
For win and linux and py310, py311 you can try pip install pygimli
which may help.
However, the pgcore
package which comes with the pip installation is not compatible with the current master
and dev
branch. If you want to use git sources with the pgcore
from pip, you need to switch to the wheel
branch which should not far away from dev
and will be rebased to the new dev after some more tests.
Cool, thanks, that works for now!