-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hi Nathaniel,
My working environment in Python consists of WSL2 + VS Code + Conda and I also use Dev Containers when Docker is needed. So far, I couldn't make R work in this environment, so I've been using rocker instead.
I've created the following Conda environment, which contains the minimum amount of libraries to give iglu-py a try:
name: iglu-env
channels:
- conda-forge
dependencies:
# Python
- python=3.12.11
- jupyter=1.1.1
- pandas=2.2.3 py312*
- pip=25.1.1
- xz=5.8.1
- zlib=1.3.1
# R
- r-base=4.4.3
- rpy2=3.6.1
- pip:
- iglu-py==1.1.1
And, not surprisingly, it doesn't work. While the Installation section says that R is not needed, it's in fact required to use rpy2. For example, check this issue on iglu where another user has created a direct Python translation of the R library.
When I run import iglu-py two things happen:
libR.socannot be found:Error importing in API mode: ImportError('libR.so: cannot open shared object file: No such file or directory'). It then proceeds toTrying to import in ABI modewithout success.libR.sois located in$CONDA_PREFIX/lib/R/lib/andiglu_pyis in~/miniconda3/envs/iglu-env/lib/python3.12/site-packages/. Adding the environment variableLD_LIBRARY_PATHin the Jupyter Notebook doesn't work, I've read that it has to be done on the shell before activating the Conda environment.- It doesn't find the
iglu_4.1.7.tar.gz file, so it starts to download all dependencies from CRAN intolib/R/and after 10 min it crashes.
Questions
- I'd like to ask you whether it's feasible to adapt the library to make it work in a Conda environment.
- Is it in your interest to do so?
Comments
- We'd have to revisit and improve the Installation section.
- The first thing I've thought about is to adapt both
__init__.pyandbridge.pyto create a distinction between Conda and non-Conda environments (L84-85 cannot see the difference betweenlib/python3.12/andlib/R/), but I've realised that it may not be a good solution. - For the time being, we can update
__init__.pyto check for whererpy2looks forlibR.soand raise anImportError. - How about automating L12 so the latest
igluversion from CRAN is passed in?
Note that I haven't created a library before, so my knowledge may be limited.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels