Find where python is installed (if it isn't default dir)

后端 未结 11 1439
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-04 06:09

Python is on my machine, I just don\'t know where, if I type python in terminal it will open Python 2.6.4, this isn\'t in it\'s default directory, there surely is a way of f

11条回答
  •  猫巷女王i
    2020-12-04 07:01

    1. First search for PYTHON IDLE from search bar
    2. Open the IDLE and use below commands.

      import sys print(sys.path)

    3. It will give you the path where the python.exe is installed. For eg: C:\Users\\...\python.exe

    4. Add the same path to system environment variable.

提交回复
热议问题