Closed StreakyCobra closed 7 years ago
I'm new to this, so this should probably be checked carefully. Also I've only test with Python 3.6. It should work with lower python 3 version, but I haven't checked.
Hey @StreakyCobra -- thanks for putting this in! I'm definitely happy to have support for multiple environment locations.
I have two concerns:
source activate
functionality is to simply prepend env bin
to $PATH
but I don't like that model -- conda
lets us install all kinds of binaries and if you think you have something installed in an environment but you don't, then it should fail, not fall back to the version installed in your root environment. Does that make sense?Completion problem should be fixed by 4eb31ff :+1:
For 2: In a sense yes, what you said should be valid for Python related stuff. But what about system commands, like ls
? With the old code I'm not able to call basic system commands like ls
, echo
, etc. because /usr/bin/
is not any longer in $PATH.
If you don't have this behavior, this may be due to ArchLinux file structure.
With the old code I'm not able to call basic system commands like ls, echo, etc. because /usr/bin/ is not any longer in $PATH.
ahhh, gotcha. yeah, that's tricky. I use arch but not the AUR package for anaconda, so the first element on my PATH (and the most common, I think, for anaconda installs) is the anaconda/bin
directory. does the arch anaconda package actually symlink the default environment stuff into /usr/bin
?
Hey @StreakyCobra, this looks great! Thanks a ton!
My pleasure!
Thanks a ton!
Until you start getting complaints because I broke everything :smiley:
This commit add the support for multiple environments directories, like having:
('/home/user/.conda/envs', '/usr/envs')
For achieving this, some other enhancements have been done:
It checks for duplicated environment names, and in this case raises an error saying that this is not supported.
The $PATH management has also been simplified for supporting multiple environments directories: When activating an environment, the system's bin dir is not replaced, but instead the environment's bin dir is placed just before it. When deactivating an environment, the environment's bin dir is simply removed from $PATH.
Signed-off-by: Fabien Dubosson fabien.dubosson@gmail.com