WSL Conda Environment in PyCharm

This was possible by using the absolute path for the conda interpreter from within PyCharm.

e.g.

C:\Users\winuser\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\LocalState\rootfs\home\wslusr\anaconda3\envs\myenv\bin 

It is now (as of very recently) not.


After some trial and error along with contacting JetBrains support, it was determined currently not possible.

My solution to get around this was to have Anaconda installed on both Windows and WSL and then create the Conda environment within Windows. I was then able to activate this environment within WSL with the absolute path to the environment.

Not the best approach but allows for editing in WSL and usage of the interpreter in PyCharm.


I haven't been able to confirm that yet, but for me it seems that the direct integration of WSL in PyCharm as Interpreter (like describede here: https://www.jetbrains.com/help/pycharm/using-wsl-as-a-remote-interpreter.html) is only possible when using the Professional Version of PyCharm and not the Community Edition.