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.
12 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:
- 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.
-
1Thanks for the solution. I just wanted to say that the user have to
hide the taskbar on windows
in order to see theok
button :) Feb 14, 2014 at 10:01 -
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. May 2, 2016 at 18:30 -
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. Aug 16, 2017 at 22:03
-
At first I chuckled and thought "noob mistake by OP! ha!"....and then I realized that was exactly my problem ^_^! Time to install... May 13, 2019 at 16:13
-
1
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.
-
1Thank you for answering my quastion, by python binary, is that the PyCharm image file?? Oct 29, 2013 at 19:44
-
2@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. Oct 29, 2013 at 19:49 -
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".
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.
Even I got the same issue and my mistake was that I didn't download python MSI file. You will get it here: https://www.python.org/downloads/
Once you download the msi, run the setup and that will solve the problem. After that you can go to File->Settings->Project Settings->Project Interpreter->Python Interpreters
and select the python.exe file. (This file will be available at c:\Python34) Select the python.exe file. That's it.
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
If you are using Ubuntu, Python has already been downloaded on your PC.
so, go to -> ctrl + alt + s -> search interpreter
-> go to project interpreter
than select Python 3.6
in the dropdown menu.
Edit: If there is no Python interpreter in drop-down menu, you should click the gear icon that on the right of the drop-down menu --> add
--> select an interpreter
.
(on PyCharm 2018.2.4 Community Edition)
I got the same issue when i newly installed pycharm in my windows 10 machine.
download python setup
install this solved my problem.
for more help visit goodluck
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"
In my case, there are several interpreters, but I have to manually add them.
To the right of where you see "No Interpreters", there is a gear icon. Click the gear icon -> Click "Add...", then you can add the ones you need.
In Linux, it was solved by opening PyCharm from the terminal and leaving it open. After that, I was able to choose the correct interpreter in preferences. In my case, linked to a virtual environment (venv).
You don't have Python Interpreter installed on your machine whereas Pycharm is looking for a Python interpreter, just go to https://www.python.org/downloads/ and download python and then create a new project, you'll be all set!
I had the same problem and stumbled onto this solution. I ran PyCharm (as administrator, though not sure if necessary). After PyCharm has completely loaded (green tick mark top right), see bottom right. Click on it. An interface will open. In my case the path was already there. I just clicked OK and all was fine. closed PyCharm and ran it again normally. Still all fine.