-
Notifications
You must be signed in to change notification settings - Fork 9
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
Installing the napari bundle edits the ~/.conda/environments.txt list #83
Comments
It's not a hack, but part of It can be considered a "registration" step to add any conda environments into that very simple database. |
@jaimergp I think then @ctrueden's question can be rephrased as: can we avoid registering, or unregister the environment as a post-install step, without breaking anything? Or is this necessary for specific functionality? I can see how it would be confusing for users that installing an app would modify their conda env list. At the same time, I can also see that this might be handy to help power users debug issues with the bundle. I don't have a strong opinion here but I'd like to understand the trade offs and come up with a final decision about whether we'll leave this as-is or try to fix/mitigate in some way. |
We can't add it as a general functionality in conda-standalone or constructor because proper conda installs (Miniconda, etc) do rely on that mechanism. However we can indeed add a post-install script to revert those modifications. The actual bug is that I don't think those entries are deleted on uninstall right now, and that's something I am more inclined to fix first. |
On second thought I think it's reasonable to consider a toggle in the constructor configuration. Started that work at conda/conda#12924, but it will take a few moving pieces for this to land. Namely:
|
Sounds like a great plan @jaimergp, thanks for looking into it 🚀 |
conda/conda#12924 was merged |
Opened conda/constructor#716 |
This feature is now available in constructor 3.5.0 as per conda-forge/constructor-feedstock#72 We'll integrate it in the next batch of installers, so I'll leave this open til that happens. |
Amazing! 🤩 |
After installing the napari bundle 0.4.18 on my Ubuntu Linux 23.04 system, I see two new nameless environments listed when I run
conda env list
:I think the reason is because the
~/.conda/environments.txt
gets edited to include these during the installation process. I tried deleting them again, and running the napari bundle, and it still works, because the command used under the hood is:bash -c 'unset PYTHONHOME && unset PYTHONPATH && eval "$("/home/curtis/.local/napari-0.4.18/_conda.exe" shell.bash activate "/home/curtis/.local/napari-0.4.18/envs/napari-0.4.18")" && /home/curtis/.local/napari-0.4.18/envs/napari-0.4.18/bin/python -m napari'
which references the environment path directly. (And I guess it couldn't reference it by name anyway, since these two environments are apparently nameless.)
So, my question is: can we make the installer not hack the
~/.conda/environments.txt
file?This is certainly a very minor issue, but it seems unnecessary to modify the user state in a non-encapsulated way here.
The text was updated successfully, but these errors were encountered: