No menu for adding WSL python interpreter in PyCharm

Question:

I was following this guide from official jetbrains page, until the step 2 comes in the existence.

In the picture mentioned in that page, has so many options like ssh, wsl, vagrant, docker, etc. In my pycharm (latest 2019.3.4) it only shows 4 options – venv, conda, pipenv and system-interpreter.

There is no WSL menu in the add python interpreter dialog.

See the below image:

enter image description here

Searched web for an hour and found no results that show how to fix it. I started plugin search in the PyCharm if there’s an external plugin to do so, but there were no plugin named as WSL.

I don’t know how to setup the WSL interpreter, I have python3.8 installed on my wsl right now.

Any help will be appreciated!

Asked By: Animesh Sahu

||

Answers:

I have solved this by

  • Uninstalling pycharm with history and cache.
  • Removing folders completely from C:Users%USERNAME%AppDataLocal and C:Users%USERNAME%AppDataRoamingJetBrains and
  • Clean re-install of pycharm
  • WSL interpreter option shows up as normal
  • Ideavim is creating a conflict I guess.
Answered By: Hakan

This helped me without having to reinstall PyCharm. In PyCharm go to

  • File, Manage IDE Settings, Restore Default Settings.

I think PyCharm was unable to find my WSL after I updated my WSL’s Ubuntu 20.04 to Ubuntu 22.04 and changed the name. (Maybe this issue wouldn’t have come up if I had kept the name "Ubuntu-20.04".)

Answered By: Bram Grooten