Reputation: 71
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
Upvotes: 6
Views: 39234
Reputation: 1
if you get this error while running a batch script, delete the "venv" folder in the same directory as the script,and then run again.
Upvotes: 0
Reputation: 11
Upvotes: 1
Reputation: 332
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.
Upvotes: 0
Reputation: 71
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
Upvotes: 4
Reputation: 9
It occurs when your python files are missing or uninstalled. Try installing python again, and then reinstall PyCharm.
Upvotes: 0
Reputation: 944
In the File -> Settings of the pycharm check if the python interpreter is setup correctly:
Upvotes: 0