Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make conda pkgs work even if CONDA_PREFIX is not set. #195

Open
tkittel opened this issue Sep 6, 2024 · 2 comments
Open

Make conda pkgs work even if CONDA_PREFIX is not set. #195

tkittel opened this issue Sep 6, 2024 · 2 comments

Comments

@tkittel
Copy link
Member

tkittel commented Sep 6, 2024

In some google colab + condacolab notebooks we actually ended up with CONDA_PREFIX not being set. So it would be great if the ncrystal conda packages could be made to work without the CONDA_prefix being set (the code DOES now after all that it is from the conda package).

@tkittel
Copy link
Member Author

tkittel commented Sep 6, 2024

In a quick test on ubuntu + python 3.12, the python site packages dir is actually below CONDA_PREFIX/lib, so simply walking up from the directory of the ncrystal python modules, would eventually yield the libNCrystal.so file.

And in the CONDA_PREFIX dir itself, we have a conda-meta directory, so presumably we could also find CONDA_PREFIX by simply walking up until we see conda-meta, and then back down to the subdir named lib.

@tkittel
Copy link
Member Author

tkittel commented Sep 6, 2024

We should of course also verify that it will work on windows, once we get that far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant