Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using conda from WSL Windows 10

I have installed conda in my Windows 10 environment. When I try to use conda from my Ubuntu WSL, it throws:

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. If your shell is Bash or a Bourne variant, enable conda for the current user with

$ echo ". C:\ProgramData\Miniconda3/etc/profile.d/conda.sh" >> ~/.bashrc

When I do that, my bash throws an error on restarting:

cygpath: command not found

-bash: /etc/profile.d/conda.sh: No such file or directory

Am I supposed to install Cygwin to use conda from within WSL?

like image 595
jgr0 Avatar asked Oct 18 '18 03:10

jgr0


People also ask

Should I use conda in wsl?

I confirmed with the conda developers and a windows install of conda is not meant to be used inside WSL. you should install conda in wsl using the conda linux installer.


1 Answers

WSL will be installed under a primary user on your machine. But you can't use Conda (which is installed in windows) from WSL.

However, you can always install python in WSL and use the code that you have in the windows file system. It will be in /mnt path.

like image 199
sam Avatar answered Oct 16 '22 16:10

sam