PyCharm doesn’t detect interpreter
I’m new to programming and just started a course on Python. I want to use PyCharm, so I downloaded and intalled it (v. 4.5, community edition). I had previously installed Python 3.5 64-bit from python.org (I’m using Windows 10). To start using PyCharm, I need a project interpreter, which I can select in the settings. As far as I’m concerned, the interpreter is «py.exe», but when I select it, I get this error message: «The selected file is not a valid home for Python SDK». I also tried to use every file whose name contained «python» or «py», and failed. On every website and video I see, they select a file called «python.exe», but they’re using Python 3.4 or a previous version. I checked that PyCharm supports 3.5 («Initial support for Python 3.5»). Is there anything I’m doing wrong? What should I do to be able to use PyCharm? All replies are appreciated. Thanks in advance.
7 Answers 7
file > new project settings > project Interpreter > click in the drop down and select ‘show all’ > click the ‘+’ button >
Now, in the Virtualenv Environment tab under the New environment radio button, check the path in the ‘Base interpreter:’ field. For me, mine was set to an invalid path. Once I had corrected the path to point to python.exe I recreated my new project and PyCharm built the virtualenv.
For me there was a bit more too. When creating the new project I expanded the drop down and had to verify the directory where the venv directory was being created. Once I had corrected the path here I had to click around a bit to get it to let me create the project.
I’m going to chaulk this up to a bug. I’m using Community edition.
When creating a project in PyCharm, if the interpret is not already selected, in the drop down menu under the projects «Location:», you can click the gear-looking icon to the right of the interpreter option, and click «Add Local»; then select the file location of the python.exe file that you have installed. It will probably be C:\Python35\Python.exe
Thanks for answering. I already did that, but there doesn’t seem to be any «pyhton.exe» file anywhere. If I search «python.exe» in my PC I get 0 results and I haven’t been able to find it manually either. As I said though, I already have Python (3.5, 64-bit) and I use it with IDLE. Do you know what I’m doing wrong?
I faced a Similar issue and was not able to find Python interpreter anywhere on the system.
The problem with it was that python was installed directly with default settings and there was no exe found in
and to solve this i tried uninstalling and reinstalling with custom settings and selecting allow for all users as well which did the trick and path was set correctly to
After which Pycharm was able to detect the interpreter on this path.
PyCharm project interpreter problem Resolved
I installed anaconda python distribution (Anaconda3-5.0.1-Windows-x86_64.exe) from the anaconda website. https://anaconda.org/anaconda/python
What it actually did was it re-installed my Python3.6.3 (pertinent to mention I have windows10, with pyCharm community & python 3.5 already but with the interpreter problem and while installing anaconda I chose the following settings and disabled my antivirus before my anaconda installation):
- selecting allow for all users
- installation path was set correctly and (stored safely for future)
- restart my Computer after installation.(not essential-but I did)
- opened Anaconda & Jet brian pycharm
- selected new project in PyCharm screen shot of my New project default Python interpreter location = C:\Users\Skboy\PycharmProjects\dani Interpreter = C:\Users\Skboy\AppData\Local\Programs\Python\Python36-32\python.exe
Wow! my pyCharm started working for me,
Resolution : Python6.3 re-installation with proper custom setting
make a python test test1.py program file to print «hello python test world»
now my Python Interpreter(automatically -by default select) Python 3.6.3
edit configuration & check for interpreter
Run
success test Run
worth to mention Anaconda Jupyter is a web based can also be used in case novice user are still having problems
I have had the exact same problem and was unable to find the solution until just now. Hopefully this works for anyone that was struggling with it.
I went to the location of the Python 3.5 (32-Bit) in my C: Drive which it turns out is just a shortcut to the actual Python application, right click on it and select Open file location which should direct you to the application version of python — simply called ‘python’. This is the .exe file that PyCharm was looking for to use as the interpreter.
Now go to the configure interpreter menu in Pycharm and type in the file location of the actual python application. To get to mine I had to go to AppData/Local/Programs/Python/Python35-32. Click on the python.exe file and it should work.
This is my first post here so if its formatted incorrectly or doesn’t use the conventional terms — sorry. Let me know if the solution worked for anyone else with the problem or if I fluked it.
Configure a system interpreter
To work with your Python code in PyCharm, you need to configure at least one interpreter. A system interpreter is the one that comes with your Python installation. You can use it solely for all Python scripts or take it as a base interpreter for Python virtual environments.
Configure a system interpreter
- Ensure that you have downloaded and installed Python on your computer. Installing Python on Windows from Microsoft Store If you are on Windows, you can download Python from the Microsoft Store and install it as a Python interpreter. Once the Python application is downloaded from the Microsoft Store, it becomes available in the list of the Python executables. Note that interpreters added from the Microsoft Store installations come with some limitations. Because of restrictions on Microsoft Store apps, Python scripts may not have full write access to shared locations such as TEMP and the registry.
- Do one of the following:
- Click the Python Interpreter selector and choose Add New Interpreter .
- Press Control+Alt+S to open Settings and go to Project: | Python Interpreter . Click the Add Interpreter link next to the list of the available interpreters.
- Click the Python Interpreter selector and choose Interpreter Settings . Click the Add Interpreter link next to the list of the available interpreters.
- Select Add Local Interpreter .
- In the left-hand pane of the Add Python Interpreter dialog, select System Interpreter .
- In the Interpreter field, type the fully-qualified path to the required interpreter executable, or click and in the Select Python Interpreter dialog that opens, choose the desired Python executable. You will need admin privileges to install, remove, and upgrade packages for the system interpreter. When attempting to install an interpreter package through an intention action, you might receive the following error message: As prompted, consider using a virtual environment for your project.
- Click OK to complete the task.
For any of the configured Python interpreters (but Docker-based), you can:
How can I add interpreter to PyCharm?
When I try to run code in editor,it says that there is no available interpreters.Please,help.How can I solve the problem?
This now is in all new projects, so it offers the virtualenv interpreter and locates installed Python(windows) as base interpreter
4 Answers 4
Just read the PyCharm’s Docs.
- Go to Settings .
- Go to the section Project Interpreter .
- Click on the plus (+) button and select the Local option.
- Search for the interpreter, in Linux it is used to be in /usr/bin/python or /usr/bin/pythonX.Y where X and Y are the version. In Windows, it is used to be in C:\python .
- Last step save the settings and you have configured the interpreter.
PD: If you are on Linux python is installed and if you are using Windows, you can download from here: https://www.python.org/downloads/windows/
I think it’s better to run this command
$ sudo apt-get install python3-distutils
This page Configuring Python Interpreter tells all the information you need.
To configure Python virtual environment, follow these steps:
- In the Settings/Preferences dialog (⌘,), click Project Interpreter.
- Click gear icon and choose Add .
- In the left-hand pane of this dialog, click the Virtual Environment node.
- Click OK to apply changes and close the dialog box.
Trying to get PyCharm to work, keep getting «No Python interpreter selected»
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.
13 Answers 13
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 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.
- 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 to Python 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 on local , 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.