Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyCharm Cannot Run Program C:\\Anaconda\\python.exe

When I go to run scripts in the terminal, I get an error in a red box that says

Pycharm cannot run program C:\Anaconda\python.exe (in directory E:\etc... CreateProcessError=2 The System cannot find the file specified.

I have uninstalled Anaconda and reinstalled it. I have also reinstalled PyCharm. Thing is though, I am using Anaconda2 and have my interpreter as C:\\Users\\my_name\\Anaconda2 and this works when I apply it in settings. I am not sure where this path C:\\Anaconda\\python.exe is coming from in the error, as I have uninstalled Anaconda and reinstalled it to C:\\users\\my_name\\Anaconda2

If it is worth noting, I did import a PyCharm settings jar file earlier today, but then decided not to use it and to go back to my original settings. This was before uninstalling PyCharm and Anaconda out of frustration, so any effects of that I think should be moot anyway.

Any help would be greatly appreciated as I am stuck using the console until I can figure this out.

Thanks.

like image 507
KidMcC Avatar asked May 26 '16 03:05

KidMcC


People also ask

How to Fix cannot run program in Pycharm?

pycharm python error Cannot run program "C:\Program Files\WindowsApps\PythonSoftwareFoundation. Python Follow. file>sittings>"python interpreter"> in the window that just opened change the directory. select the other one and hit apply and you're done.

Can't open file create ': Errno 2 No such file or directory?

The Python FileNotFoundError: [Errno 2] No such file or directory error is often raised by the os library. This error tells you that you are trying to access a file or folder that does not exist. To fix this error, check that you are referring to the right file or folder in your program.


2 Answers

Deleting the .idea folder solved the problem for me. Pycharm will create a new .idea folder with the correct path.

like image 121
Cohensius Avatar answered Oct 16 '22 21:10

Cohensius


This happened to me when I installed Pycharm. What I did was go to the .idea\workspace file of the project and change the path. Search and change the wrong route for the good one.

(...)
<option name="SDK_HOME" value="C:\Users\...\python.exe" />
(...)
like image 43
David Córdoba Ruiz Avatar answered Oct 16 '22 22:10

David Córdoba Ruiz