Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conda activate/deactivate environment breaking PATH

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

like image 555
Brad Allen Avatar asked Aug 15 '26 14:08

Brad Allen


1 Answers

Most probably your conda environment is replacing the parameters and environment variables defined in your local bash profile. I am sure if you open a new environment(bash session), you will find everything is working fine.

I would suggest you add a command to reload bash profile after deactivating the environment, so that the profile variable values will again be applied. It should solve the problem.

like image 124
Lohit Gupta Avatar answered Aug 17 '26 05:08

Lohit Gupta



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!