1

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 ?

5
  • Don't link to screenshots of code; put code examples in the body of the question. Also, be clear what you want to do, what you have tried, and what the results were. Commented Aug 28, 2017 at 20:04
  • @jdv its not a problem to do with code, its a pycharm related issue. Regarding the actual question stated by the OP, could you right-click on your file in the tabs things on the far right of the green arrow? There should be a run option. Commented Aug 28, 2017 at 21:08
  • @Octo My current file which i want to run (variable_scope.py) is not showing in the list how can i run it ? Commented Aug 28, 2017 at 21:15
  • Have you tried the answer below? Alt+Shift+10? Commented Aug 28, 2017 at 21:26
  • @Octo yes I tried but its still the same ! Commented Aug 28, 2017 at 22:24

2 Answers 2

4

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.

Sign up to request clarification or add additional context in comments.

2 Comments

You can't run it yet!
No its not running!
0

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.