1

I have tried many times to initialise conda for shell interaction using the command "conda init bash" on my terminal but it always says "No action taken."

What am I doing wrong?

Pepe
  • 301
  • 4
  • 13
  • 2
    Please add some more details (Conda version, OS, etc.) Is there already a Conda-managed section in your `.bashrc` or `.bash_profile`? Are you sure the shell you are running is bash (check with `echo $0`)? – merv Mar 11 '20 at 17:20
  • yes please add some details... – Charlie Parker Mar 27 '20 at 22:57

1 Answers1

0

With so little details in your question it's hard to help you. You should read carefully and paste what conda init bash is outputting (and your .bashrc, .bash_profile and output of PATH).

I was in a similar issue and what happened was that the conda init modifies your .bash_profile and adds some code at the end. But if you are running your .bashrc before that code is being added then conda won't behave correctly during the loading of your bashrc file. So inspect both files and make sure they are the way you expect them (especially because code analysis is undecidable).

Also, make sure your PATH environment variable looks the way you expect. If not make sure your not modifying it in unexpected ways and that the path to conda is there correctly.

See my answer here for more details: Why is conda init updating my .bash_profile incorrectly?

Additionally, if you are using vscode you might have other problems like needing to set the terminal.integrated.inheritEnv to false. Read here for more info: https://code.visualstudio.com/updates/v1_36#_launch-terminals-with-clean-environments

Opening and closing vscode completely seems to help a lot, do this.

Another helpful tip is to go the top left of vscode where it says code click it then go to preferences and then settings. Then you can change the terminal.integrated.inheritEnv to false by unclicking/selecting it.

Charlie Parker
  • 5,884
  • 57
  • 198
  • 323