by @kodeazy

How to check python installation folder in windows?

Home » Python » How to check python installation folder in windows?
  • To check the python installation folder in windows follow the below steps.
  • First create a sample python file with name pathfile.py and execute the below code.

    import os
    import sys
    print(os.path.dirname(sys.executable))
  • After execution with command py pathfile.py in command prompt we get the path as below.
C:\Users\JOHN\AppData\Local\Programs\Python\Python310