Trying to get PyCharm to work, keep getting "No Python interpreter selected"

237,650

Solution 1

Your problem probably is that you haven't installed python. Meaning that, if you are using Windows, you have not downloaded the installer for Windows, that you can find on the official Python website.

In case you have, chances are that PyCharm cannot find your Python installation because its not in the default location, which is usually C:\Python27 or C:\Python33 (for me at least).

So, if you have installed Python and it still gives this error, then there can be two things that have happened:

  1. You use a virtualenv and that virtualenv has been deleted or the filepath changed. In this case, you will have to find proceed to the next part of this answer.
  2. Your python installation is not in its default place, in which case you will need to find its location, and locate the python.exe file.

Once you have located the necessary binaries, you will need to tell PyCharm were to look:

  1. Open your settings dialogue CTRL + ALT + S
  2. Then you will need to type in interpreter in the search box:

    enter image description here

  3. As you can see above, you will need to go to Project Interpreter and then go to Python Interpreter. The location has been selected for you in the above image.

  4. To the side you will see a couple of options as icons, click the big + icon, then click on local, because your interpreter is on this computer.

  5. This will open up a dialogue box. Make sure to select the python.exe file of that directory, do not give pycharm the whole directory. It just wants the interpreter.

Solution 2

Go to File->Settings->Project Settings->Project Interpreter->Python Interpreters

There will be a "+" sign on the right side. Navigate to your python binary, PyCharm will figure out the rest.

Solution 3

During the install of python make sure you have "Install for all users" selected. Uninstall python and do a custom install and check "Install for all users".

Solution 4

This situation occurred to me when I uninstalled a method and tried to reinstall it. My very same interpreter, which worked before, suddenly stopped working. And this error occurred.

I tried restarting my PC, reinstalling Pycharm, invalidating caches, nothing worked.

Then I went here to reinstall the interpreter: https://www.python.org/downloads/

When you install it, there's an option to fix the python.exe interpreter. Click that. My IDE went back to normal working conditions.

Solution 5

for mac I can tell you that first you have to check your path

by executing this command

which python or which python3

check where python is installed

then you have to configure it in your pycharm.

pycharm-->preferences-->gear button-->add..

enter image description here

click on system interpreter--> then on ...

then you search where your python version is installed

enter image description here

once it is done then you have to configure for your project

click on edit configuration

enter image description here

then choose the python interpreter

enter image description here

Share:
237,650
Ted pottel
Author by

Ted pottel

One of those people who started programming when computers had tape recorders. Currently specializing in the mobile devices and starting up a company called learning tree apps ( Learning apps for young children)

Updated on September 19, 2021

Comments

  • Ted pottel
    Ted pottel almost 3 years

    I'm trying to learn Python and decided to use PyCharm. When I try to start a new project I get a dialog that says "No Python interpreter selected". It has a drop down to select a interpreter, but the drop down is empty.

  • Ted pottel
    Ted pottel over 10 years
    Thank you for answering my quastion, by python binary, is that the PyCharm image file??
  • CrazyCoder
    CrazyCoder over 10 years
    @Tedpottel python binary is what you are using to run your Python scripts, like d:\dev\Python27\python.exe on Windows or /usr/bin/python on Mac/Linux.
  • William Kinaan
    William Kinaan over 10 years
    Thanks for the solution. I just wanted to say that the user have to hide the taskbar on windows in order to see the ok button :)
  • RattleyCooper
    RattleyCooper about 8 years
    No virtualenv here, and python is installed to the default location as well. Still had this issue. The answer here helped get me to the point to where it was working, however I had to restart pycharm to make the changes for some odd reason.
  • user124384
    user124384 almost 7 years
    This did not work with Ubuntu 16.04, PyCharm edition 2017.2.1. There isn't even "Python Interpreters" under "Project Interpreter" as depicted in the screenshot.
  • antew
    antew over 6 years
    This was the easiest answer. Works well!
  • Somatic Custard
    Somatic Custard about 5 years
    At first I chuckled and thought "noob mistake by OP! ha!"....and then I realized that was exactly my problem ^_^! Time to install...
  • Mateen
    Mateen about 5 years
    This same solution worked on Ubuntu too. Thanks for the solution.
  • kev
    kev over 4 years
    NOTE: Please restart PyCharm after this if you still see the "No Python Interpreter selected" message in your Python Console.
  • Admin
    Admin almost 3 years
    Sorry - That must be "See <no iiterpreter> bottom right"