You have to be sure about the path of the python. So use this
import sys
print(sys.path)
For Python36 the path is as following:
C:\Users\user\AppData\Local\Programs\Python\Python36
In Python 3
Under 'Python commands', look for the 'Compile' line. Enter the following in the 'Command' box. Make sure you get the spaces right. You should have 'C:\Python34\python' followed by a space, and the rest of the command. If you have 'Python 34', with a space between Python and 34, Geany will not be able to run your code. Also, make sure your capitalization matches what you see here exactly.
C:\Python34\python -m py_compile "%f"
or use the path as the following
C:\Users\user\AppData\Local\Programs\Python\Python36 -m py_compile "%f"
Under 'Execute commands', look for the 'Execute' line. Enter the following in the 'Command' box, paying attention once again to the spaces.
C:\Python34\python "%f"
or
C:\Users\user\AppData\Local\Programs\Python\Python36 "%f"
Test your setup by running hello.py again.
Python 2
If you installed Python 2.7 instead of Python 3, the commands you want are probably:
C:\Python27\python -m py_compile "%f"
or path of your python -m py_compile "%f"
and
C:\Python27\python "%f"
or path of your python "%f"
See this link for more information:http://introtopython.org/programming_environment_windows.html