ContinuumIO / anaconda-issues

Anaconda issue tracking
648 stars 221 forks source link

Be more selective in which system commands Anaconda overrides #372

Open ncoghlan opened 9 years ago

ncoghlan commented 9 years ago

(Relocated from https://github.com/conda/conda/issues/1412)

When the Anaconda installer is configured to modify the user's .bashrc file, accessing shadowed system commands requires specifying the full path. Anaconda's scope means that this can lead to surprising consequence, where commands are shadowed when not expected, especially if there's a problem with the Anaconda version of the command (e.g. issue #307)

@asmeurer clarified that having source deactivate not work is deliberate (to avoid accidentally breaking invocation of conda and source activate), so my request is that the Anaconda binaries be split into two groups for default PATH modification purposes, a more tightly controlled and clearly documented subset which overrides system binaries (such as conda, and activate), and the full complement, which would be added to the end of PATH, ensuring their availability without shadowing the system versions.

Activating a conda environment would still ensure that the system versions were all shadowed, but side effects outside conda environments would be minimised.

pitrou commented 9 years ago

+1. I think this is highly desirable for anyone with a complex work environment. I currently don't add the conda bin dir to my PATH, instead I make a symlink of the conda script into my ~/.local/bin. Otherwise too much stuff could get overriden by mistake (such as python itself, but also pip, openssl, sqlite3...).

ncoghlan commented 9 years ago

Oops, I forgot to transfer the context where I discovered the issue:

A participant at a Software Carpentry bootcamp had tripped over #307 after enabling the .bashrc modifications when installing Anaconda, so the up arrow wasn't working for command scrollback when they ran sqlite3. Seeing readline not working on an Ubuntu system was rather confusing and it didn't occur to me to run /usr/bin/sqlite3 instead once which sqlite3 showed me sqlite3 was picking up the system version.

I'd had other folks complain to me that they'd found Anaconda frustrating when helping other people out at introductory programming workshops, and I'd now bet that this is the problem they were running into. I hadn't understood what they were complaining about previously, as I'd never encountered the optional .bashrc modifications.

duozmo commented 8 years ago

Is the name collision with virtualenv’s deactivate intentional?

kalefranz commented 6 years ago

With conda 4.4, we introduced conda activate and conda deactivate. While it'll take time, we have now have a deprecation path for the bare activate and deactivate commands.