Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

python

pycharm

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.

like image 998
Ted pottel Avatar asked Oct 28 '13 21:10

Ted pottel


People also ask

Why is Python interpreter not showing in PyCharm?

When configuring the base interpreter, you need to specify the path to the Python executable. If PyCharm detects no Python on your machine, it provides the following options: Specify a path to the Python executable (in case of non-standard installation) Download and install the latest Python versions from python.org.

Is Python automatically installed with PyCharm?

PyCharm is our favorite IDE for developing applications with Python. With the release of PyCharm 2020.1, PyCharm can now install the Python interpreter automatically if it does not detect an existing installation.


2 Answers

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.

like image 147
Games Brainiac Avatar answered Oct 05 '22 23:10

Games Brainiac


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.

like image 34
jaor Avatar answered Oct 06 '22 01:10

jaor