Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 859
Asier R. Avatar asked Sep 28 '15 21:09

Asier R.


People also ask

Why is PyCharm not detecting interpreter?

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.

How do I install Python interpreter?

Select the Add Environment command in the Python Environments window or the Python toolbar, select the Python installation tab, indicate which interpreters to install, and select Install.

Where does PyCharm store interpreter settings?

IDE settings are stored in the dedicated directories under PyCharm home directory.


1 Answers

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.

like image 137
DonkeyKong Avatar answered Oct 08 '22 01:10

DonkeyKong