Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 754
Pavan Kumar Avatar asked Dec 13 '22 19:12

Pavan Kumar


2 Answers

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.

like image 88
Rakesh Ramakrishnan Avatar answered Dec 17 '22 23:12

Rakesh Ramakrishnan


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

like image 44
树下不论 Avatar answered Dec 17 '22 23:12

树下不论