Trying to get PyCharm to work, keep getting "No Python interpreter selected"
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:
- You use a
virtualenv
and thatvirtualenv
has been deleted or the filepath changed. In this case, you will have to find proceed to the next part of this answer. - 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:
- Open your settings dialogue CTRL + ALT + S
Then you will need to type in
interpreter
in the search box:As you can see above, you will need to go to
Project Interpreter
and then go toPython Interpreter
. The location has been selected for you in the above image.To the side you will see a couple of options as icons, click the big
+
icon, then click onlocal
, because your interpreter is on this computer.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
then you have to configure it in your pycharm.
pycharm-->preferences-->gear button-->add..
click on system interpreter--> then on ...
then you search where your python version is installed
once it is done then you have to configure for your project
click on edit configuration
then choose the python interpreter
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, 2021Comments
-
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 over 10 yearsThank you for answering my quastion, by python binary, is that the PyCharm image file??
-
CrazyCoder over 10 years@Tedpottel
python
binary is what you are using to run your Python scripts, liked:\dev\Python27\python.exe
on Windows or/usr/bin/python
on Mac/Linux. -
William Kinaan over 10 yearsThanks for the solution. I just wanted to say that the user have to
hide the taskbar on windows
in order to see theok
button :) -
RattleyCooper about 8 yearsNo
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 almost 7 yearsThis 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 over 6 yearsThis was the easiest answer. Works well!
-
Somatic Custard about 5 yearsAt first I chuckled and thought "noob mistake by OP! ha!"....and then I realized that was exactly my problem ^_^! Time to install...
-
Mateen about 5 yearsThis same solution worked on Ubuntu too. Thanks for the solution.
-
kev over 4 yearsNOTE: Please restart PyCharm after this if you still see the "No Python Interpreter selected" message in your Python Console.
-
Admin almost 3 yearsSorry - That must be "See <no iiterpreter> bottom right"