I have installed Bash for windows by activating the Windows Subsystem for Linux and installing Ubuntu and when I installed Anaconda I selected the "Add Anaconda to my PATH environment variable" setting, so I do not believe there are any issues with PATH. What I see in my Edit environment variables window is:
C:\Users\user\anaconda3
C:\Users\user\anaconda3\Library\mingw-w64\bin
C:\Users\user\anaconda3\Library\usr\bin
C:\Users\user\anaconda3\Library\bin
C:\Users\user\anaconda3\Scripts\
In Bash, when I enter something such as conda info --base I get conda: command not found
However, when I run the same command in Git Bash, it runs just fine.
CodePudding user response:
you can:
- use git-bash / PowerShell / CMD for Anaconda
- use Windows Terminal for easily using multiple shells
- modify
~/.profileto include the Anaconda folders toPATH./mnt/c/Users/user/Anaconda3...- NB you may experience issues with file paths or output
- check the output of
echo "${PATH//:/$'\n'}" | grep -i condain a new session ofbash- typically, Windows and WSL should have already configured this for you
- install Anaconda on WSL following official Linux instructions for your distro
- if unsure which distro, it's likely Ubuntu. so instructions for Debian, the parent of Ubuntu
WSL is a complete Linux virtual machine and not your best bet for running (cli) software that you installed on Windows. you can but i would personally prefer installing the Linux version in WSL.
CodePudding user response:
From within git bash, you can type, command -v conda, as it will output the location to the executable. Add the directory to your PATH environment variable.
Eg from within git bash:
$ command -v my_command
/path/to/bin/my_command
Then add /path/to/bin to your PATH environment variable. And reopen your bash shell.
