简体   繁体   中英

PyCharm not finding Anaconda Python, giving “can't open file 'python.py': [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:/Users/liuzh/PycharmProjects/tensorflow/venv/Scripts/python.exe
C:/Users/liuzh/.PyCharmCE2019.3/config/scratches/python.py
C:/ProgramData/Anaconda3/python.exe: can't open file 'C:/Users/liuzh/.PyCharmCE2019.3/config/scratches/python.py': [Errno 2] No such file or directory

Process finished with exit code 2

As it says that there is no such file or directory. You can try two things:

  1. install pip, install python and change your base directory interpreter of your pycharm project to that python.
  2. if you have properly installed anaconda, you can use anaconda navigator to install pycharm. Which will chances are do everything for you, so you don't have to worry about file path or anything.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM