You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> from PascalX import genescorer
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "path_to_miniconda3_folder/envs/PascalX/PascalX/python/PascalX/genescorer.py", line 20, in <module>
from PascalX import wchissum,snpdb,tools,refpanel,genome,hpstats
File "path_to_miniconda3_folder/envs/PascalX/PascalX/python/PascalX/wchissum.py", line 21, in <module>
from PascalX_core import lib,ffi
ImportError: libruben.so: cannot open shared object file: No such file or directory
After checking the folders resulting from the make command, I found that it was just a matter of these shared objects not being linked (as they are actually found in the PascalX/build/lib folder. A very fast and easy solution is to create a symlink to libruben.so, libdavies.so , and libwchissum.so in the lib folder of the conda environment, in this example path_to_miniconda3_folder/PascalX/lib:
We replicated the same problem on multiple machines (and different Python versions, the latest being 3.12.3), and this simple procedure above solved the error(s) on all of them.
I am not sure whether this is something that can be easily solved for the conda-packaged PascalX, but I figured writing it here. people with the same problem (and make you aware that this couldmight help some an issue for some users)!
Thank you in advance for your help!
Dennis.
The text was updated successfully, but these errors were encountered:
denbonte
changed the title
Compiled library files are not linked when installing with condo
Compiled library files are not linked when installing with conda
Feb 7, 2025
I think the issue is that conda does not support setting LD_LIBRARY_PATH. See for instance the discussion here.
A workaround stated there:
Now, every time I activate a env, I have to manually export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
Another solution would be to install the .so into one of the system lib dirs, but that requires sudo.
I do not recall what the original motivation had been for using an additional .so library file. I think one of the motivations could have been that one can directly use the lib elsewhere. But we may think about moving the code away from the .so, which should then allow to skip the LD path setting.
Dear Dan,
Good day, and thanks for your work on maintaining the package!
I installed PascalX in a
conda
environment following the procedure below:After installing the
boost
libraries in the conda environment:Following a recommendation from a colleague, I updated the first line of the
Makefile
from:To:
Where
path_to_miniconda3_folder
is the location where I created a fresh conda environment, in my case running Python 3.10.16:Everything seemed to work fine, until this point:
After checking the folders resulting from the
make
command, I found that it was just a matter of these shared objects not being linked (as they are actually found in thePascalX/build/lib
folder. A very fast and easy solution is to create a symlink tolibruben.so
,libdavies.so
, andlibwchissum.so
in thelib
folder of the conda environment, in this examplepath_to_miniconda3_folder/PascalX/lib
:We replicated the same problem on multiple machines (and different Python versions, the latest being 3.12.3), and this simple procedure above solved the error(s) on all of them.
I am not sure whether this is something that can be easily solved for the conda-packaged PascalX, but I figured writing it here. people with the same problem (and make you aware that this couldmight help some an issue for some users)!
Thank you in advance for your help!
Dennis.
The text was updated successfully, but these errors were encountered: