ubuntu – WSL2, conda activate an environment, but cannot use the corresponding python version

Try which python in the command line to see if it’s using the python interpreter from anaconda or the one from ubuntu.

If you get something like /bin/python then the interpreter from ubuntu is being used and the anaconda install/config may be bad.

Try uninstalling anaconda documentation and make sure that the code block added by anaconda in ~/.bashrc is really gone after, in case it was changed and anaconda didn’t recognize it for removal.

While you’re at it, I’d like to recommend mamba, which is just conda, but faster (multithreaded) from my experience. Give it a try if you’re feeling adventurous. mamba from miniforge

I’d like to also suggest answering “yes” when the installer asks to auto init conda. You can disable it later. This just removes another possible point of failure.

Good luck.

Read more here: Source link