Reputation: 19
click here to see the attached image
My current file is variable_scope.py but no option to run this file is showing up although option to run older files are showing up , what to do ?
Upvotes: 1
Views: 27066
Reputation: 619
If you renamed your directory your interpreter (python.exe
) will be lost as PyCharm will look for it in its previous path.
To fix this go to Settings or press Ctrl+Alt+S
go to Project
> Project Interpreter
and from the Project Interpreter dropdown select Show All
then from the list select the python.exe
on its current path and press the +
symbol on your right.
Upvotes: 0
Reputation: 1122
First you have to set the project interpreter.when you opened pycharm go to the setting\project\project interpreter and set address of the python interpreter in your system.
After that you can run your code by selecting run at top menu and choosing Run... button. You can use the shortcut by pressing Alt+Shift+F10.
Upvotes: 4