ralna / RALFit

A non-linear least squares solver
Other
25 stars 6 forks source link

ImportError: libral_nlls.so when import RalNLLS #108

Closed Rishoban closed 1 month ago

Rishoban commented 2 years ago

I recently install RalNLLS 1.0 by following instructions(https://ralfit.readthedocs.io/projects/Python/en/latest/install.html). When i import ral_nlls it shows below error.

Traceback (most recent call last): File "", line 1, in ImportError: libral_nlls.so: cannot open shared object file: No such file or directory

I followed this (https://stackoverflow.com/questions/53347759/importerror-libcblas-so-3-cannot-open-shared-object-file-no-such-file-or-dire) instruction to solve issue but still it shows same error.

System: Ubuntu 20.04 Python version 3.8.10

tyronerees commented 2 years ago

Sorry that the docs aren't clear here. I think the issue is probably that the library isn't in the LD_LIBRARY_PATH. The script makebuild.sh is designed to install and set up RALFit for an ubuntu testing environment, and so using that as a guide (or even just running it locally) should work for you. I think something like export LD_LIBRARY_PATH=$SCRIPTPATH/libRALFit/build/src/:$LD_LIBRARY_PATH is all that's needed -- you'll need to put that in your .bashrc file so that the library is in the path for future sessions.

Let me know if you still have issues after this.

Rishoban commented 2 years ago

Thanks!! It works.