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.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
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
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
orC:\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:
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.python.exe
file.Once you have located the necessary binaries, you will need to tell PyCharm were to look:
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.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.
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.
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".
If you are using Ubuntu, Python has already been downloaded on your PC. so, go to -> ctrl + alt + s -> search
interpreter
-> go toproject interpreter
than selectPython 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 aninterpreter
.(on PyCharm 2018.2.4 Community Edition)