0

I have installed Miniconda for Windows Subsystem for Linux. Every time I start the VScode terminal I get the message: conda command not found. I can use conda only if I type the commands:

  1. source ~/.bashrc
  2. export PATH="/home/user/miniconda3/bin:$PATH"

Is there a way to fix it?

I have also put the export PATH="/home/user/miniconda3/bin:$PATH" on the ubuntu terminal too, but it didn't change anything.

Gitau Harrison
  • 3,179
  • 1
  • 19
  • 23
  • Where do you type these commands? In the shell, add the configuration to the shell's startup files (`.bash_profile` if your shell is Bash) or ... somewhere in VSCode's configuration (probably also a FAQ) if that's what's not working. – tripleee Apr 20 '21 at 12:08
  • In the Ubuntu shell and in the VSCode Terminal. The home directory contains the .bash_profile actually. – SvetaSchmidt Apr 20 '21 at 14:30

1 Answers1

0

Make sure you have a file called .bash_profile in your home directory. This file is going to call your .bashrc file. It should have been autogenerated, either when you set up your OS or when you created the .bashrc file, but you can create it manually too:

.bash_profile:

test -f ~/.profile && . ~/.profile
test -f ~/.bashrc && . ~/.bashrc

.bashrc:

export PATH="/home/user/miniconda3/bin:$PATH"

If the problem is only present in VSCode, this thread might help too: VSCode Integrated Terminal Doesn't Load .bashrc or .bash_profile

jdabtieu
  • 534
  • 5
  • 20