PyCharm Python interpreter error "No python at 'C:\Program Files\Python38\python.exe'

Viewed 14948

I'm using python 3.8.2. In pycharm i setup my python interpreter for my project to virtual environment and system interpreter set to C:/Python38/python.exe (where's actually my python and not C:\Program Files\Python38\python.exe)

I get error when running my file "No Python at 'C:\Program Files\Python38\python.exe'"

Project Interpreter settings screenshot

4 Answers

In the File -> Settings of the pycharm check if the python interpreter is setup correctly:

enter image description here

It occurs when your python files are missing or uninstalled. Try installing python again, and then reinstall PyCharm.

Even if it's a little bit late, I hope this solution helps someone struggling with the same problem : I had this issue while working with vscode and python venv : After changing the path of python on my pc, I got an error "No Python at 'Old/Path'.." I fixed it by changing the path of python in 'pyvenv.cfg' in the virtual environment folder. This is the content of the file :

home = C:\Program Files\Python    #the new path of python
include-system-site-packages = false
version = 3.10.4

Please try to update the python path in windows environment variables, check on the bottom left corner of Pycharm for the selected python interpreter which is being used while running the code, also check top right corner run main (edit configurations) in Pycharm.

Related