Closed aulemahal closed 6 months ago
Totally forgotten about that.. damn. You are absolutly right! I didnt want to touch python-rpn, but that might be a better solution. Could you make the PR modification in python-rpn, I'll update the conda_packaging project. Thank you! spookipy, fstpy, ci_ftscomp and fstcatalog our on their way to be added
https://github.com/sebastiendfortier/conda_packaging/blob/6c2d21e04b90d34b39a284c48a6ca653fae32c02/conda_recipies/python-rpn/conda.recipe/etc/conda/activate.d/env_vars.sh#L1
I fully understand why you would use the activate hooks to set that variable, but this breaks a few setups that I think are more common than one would think:
In all of these cases, the conda environment that contains
librmn
and others is not actually activated before being used. Therefore, importing the python packages fails with something similar to :I had the same problem with ESMF and it was fixed by making a guess about the library location if the env variable was not set. See : https://github.com/esmf-org/esmf/pull/151
The error could be fixed by adding
os.path.join(sys.prefix, 'lib')
to the list of paths in https://github.com/sebastiendfortier/python-rpn/blob/a72c862d37c28e9b9a67e7c8aa590c292808397e/lib/rpnpy/librmn/__init__.py#L93-L101Does that make sense ? I could suggest a PR in the other repo, but I suspect github isn't the main.
(PS: Tu me le dis si tu préfères les courriels, ou le français)