Open barikata1984 opened 6 days ago
Hardcoding the paths runs into the same mistakes that are in the current code. This won't work if using either miniforge or mambaforge; or if the user decides to install somewhere other than the default location. All these variations of conda use common environment variables that should be used instead of all these variations of Anaconda, conda, miniconda, etc.
Base is at $(dirname $CONDA_EXE)
and the envs are at $(dirname $CONDA_EXE)/../envs
.
@RobertoRRW
Why don't you post an improvement request or make a PR? Hardcoding is the approach this plugin has employed to locate venvs. The objective of this PR is just to add the ability to find miniconda envs without custom configurations
@RobertoRRW I think the best we can do is let the user define their own searches if the venvs are not in their default location. And that's what the regexp
version of the plugin adds, besides a general cleanup of code. :)
@barikata1984 Thanks a lot for the PR, I will review it in a week since I'm on vacation currently. :)
What
Find Miniconda
envs
directories set up with the standard installation and make them selectable.Why
Some users, including me, prefer Miniconda to Anaconda. Making the venvs created by miniconda selectable as the default behaviour of this plug-in sounds cool.
How
Just follow how Anaconda
envs
are detected.Note
The same approach should work on MacOS and Windows. But, I have not implemented and tested it because I do not have those machines right now.