Search code examples
pythonanacondawindows-subsystem-for-linuxactivation

anaconda activation bug on windows wsl2


I'm trying to activate anaconda on wsl2.

anaconda version - Anaconda3-2021.05-Linux-x86_64
wsl distro - ubuntu 20.04.1

I'm getting this error on opening a new shell

bash: eval: line 203: syntax error near unexpected token ('`

Subsequent activation of other environments with conda activate <envname> fails with a similar error.

Help will be appreciated,
Roy


Solution

  • wsl adds environment variables from windows itself. One of the paths in the path environment variable was missing an apostrophes. That was the cause.