Pavan Kumar
Pavan Kumar

Reputation: 81

PyCharm not finding Anaconda Python, giving "can't open file 'python': [Errno 2] No such file or directory?"

I am new to Python. Installed Anaconda on my system. I installed PyCharm too. When I try to run a file from PyCharm I get this error message:

C:\Python\Test\venv\Scripts\python.exe python 3.6 C:/Python/Test/while.py C:\Python\Test\venv\Scripts\python.exe: can't open file 'python': [Errno 2] No such file or directory

Upvotes: 7

Views: 30681

Answers (6)

JCSommer
JCSommer

Reputation: 24

I had the same problem with the Pycharm Community Edition (CE). Solved it by switching to Pycharm Professional.

Upvotes: -3

alxh28
alxh28

Reputation: 63

I had the same issue and then solved it by running PyCharm as administrator.

Upvotes: 1

树下不论
树下不论

Reputation: 31

Under Conda Environment, you can try to choose X:\Anaconda3\Scripts\conda.exe.

Upvotes: 3

Rakesh Ramakrishnan
Rakesh Ramakrishnan

Reputation: 131

You have mentioned that you have already installed the Anaconda in your system. You can try the following,

  1. Go to Project Interpreter in Pycharm
  2. Under Conda Environment, choose the Existing Environment and select the python.exe from the Anaconda Installation folder in the Interpreter field.
  3. Enable the option, Make available to all projects and click ok.

You should now be able to see the libraries in the Project Interpreter.

Upvotes: 13

Dimitri Ognibene
Dimitri Ognibene

Reputation: 41

The command you are using is wrong, try:

C:\Python\Test\venv\Scripts\python3.exe  C:/Python/Test/while.py 

Upvotes: -1

Gsk
Gsk

Reputation: 2945

It seems that you have virtual environment installed without python version. If you are new to Python, it may be better if you follow the easiest path: download python 2.7 or 3.6 from Python website.

If you run the installer, you should find the python folder in C:\Python27 or C:\Python36.

Then you should assert that this folder is in windows paths, set them in Enviromental variables in System property.

For the last step you need to set Python interpreter in PyCharm:

File -> Settings -> Build, Execution, Deployment -> Console -> Python Console -> Python interpreter

and set as interpreter the python.exe file in your X:/PythonNN folder

Upvotes: 1

Related Questions