Search code examples
pythonpycharminterpreter

Python Interpreter not showing anything in PyCharm


Issue

So, I've used PyCharm for quite a while and I know how to set environments, etc. For some reason, I can't seem to access the Python interpreters that I've got (see image).

enter image description here

When I open the same project in Clion I am able to run the files and I can see the interpreters.

Attempted solutions

  1. Run in Clion to see if the interpreter "sticks".

  2. Removed the .idea file.

  3. Reinstalled PyCharm.


Solution

  • Usually Python Interpreter is a sub-item of Build, Execution, Deployment in the Settings. (In PyCharm 2021, the layout in PyCharm 2019 was slightly different).

    The fact the item appears separately is a strong hint that you either installed a plugin or for some reason the IDE was opened in LigthEdit mode (this can easily happen if you launch the IDE using the command-line). This can also happen if you don't have an open project (having files open is not the same as opening a project, as such, with an .idea folder - the IDE configuration files will be different.)

    Having the IDE in LightEdit mode provides only a limited set of functionalities, so the IDE doesn't allow you to configure an Interpreter in the usual way (other setting dialogues will also behave different from usual).

    The solution is to Exit the LightEdit mode, opening your previous project or a new one by going to File > Open or File > New Project.