Conda activate/deactivate environment breaking PATH

Viewed 9429

I am finding that when I create a Conda environment source activate environment and then deactivate that environment source deactivate environment, my native bash commands no longer work.

I've attached an image of ls working before enabling an environment and then not afterwards. I assume that this is something because of my PATH - but I am a novice and am not sure specifically what to fix. I am doing this in Git Bash on Windows. Anaconda 3 and Python 3.5.

Please work ls, come on

4 Answers

There are a few bugs in the activate/deactivate scripts, which I've fixed in versions I call activate.cygwin and deactivate.cygwin.

  • activate.cygwin: fixes 2 places where the conda command returns a string with a return "\r" at the end that confounds processing.

  • deactivate.cygwin: fixes conversion of /cygdrive/... to avoid error CondaValueError: Could not find environment: /cygdrivec:\Users\rjp\Anaconda2\envs...

I've posted the modified scripts to https://bitbucket.org/snippets/plevin/. See instructions at the top of activate.cygwin.

Related