4

Everything was working perfectly until today, when for some reason my python.exe file disappeared from the Project Interpreter in Pycharm.

It was located in C:\users\my_name\Anaconda3\python.exe, and for some reason I can't find it anywhere!

Yet, all the packages are here (in the site-packages folder), and only the C:\users\my_name\Anaconda3\pythonw.exe is available.

With the latest however, some packages I installed on top of those available in Anaconda3 won't be recognized.

Therefore, how to get back the python.exe file?

JejeBelfort
  • 1,593
  • 2
  • 18
  • 39
  • are you able to run python from console? If so, try `which python` or `where python` (first - mac\linux second - windows) – NotSoShabby Mar 12 '19 at 14:52
  • 'python' is not recognized as an internal or external command, operable program or batch file. – JejeBelfort Mar 12 '19 at 14:54
  • and C:\users\my_name\Anaconda3\ is in my environment variables... – JejeBelfort Mar 12 '19 at 14:55
  • Are you using a virtual env? also, did you check inside the bin folder under the anaconda folder? – NotSoShabby Mar 12 '19 at 14:59
  • 2
    Issue like this happened to me once after anaconda update about half a year ago. I manually copied `python.exe` from the most fresh python package (folder `pkgs` then folder like `python-3.6.8-h9f7ef89_7`). This helped me. Try this way. Wish you luck. –  Mar 12 '19 at 15:00
  • @Poolka Looks like this is working like this. Thanks a lot! Actually I remember having had a windows update in between... -_- I let you write the answer should you want to earn some rewards ;) – JejeBelfort Mar 12 '19 at 15:08
  • The packages may have been renamed, python.exe to python.exe.c~ for example if something happened during a conda operation. Renaming the files can fix the issues too. – Nathan Jan 22 '20 at 16:43

3 Answers3

4

I just had the same issue and found out that Avast removed it because it thought it was a threat. I found it in Avast -> Protection -> Virus Chest. And from there, you have the option to restore it.

LoneCodeRanger
  • 413
  • 6
  • 18
2

The answer repeats the comment to the question.

I had the same issue once after Anaconda update - python.exe was missing. It was Anaconda 3 installed to Program Files folder by MS Visual Studio (Python 3.6 on Windows10 x64).

To solve the problem I manually copied python.exe file from the most fresh python package available (folder pkgs then folder like python-3.6.8-h9f7ef89_7).

0

My Python.exe was missing today in my existing environment in anaconda, so I clone my environment with anaconda to recreate Python.exe and use it again in Spyder.