1>>> import os
2>>> import sys
3>>> os.path.dirname(sys.executable)
4'C:\\Python25'
1pip list -v # Or pip3 list -v
2
3# output example (windows 10):
4# Package Version Location Installer
5# ------------------------- --------- ---------------------------------------------------------------- ---------
6# adal 0.4.5 c:\users\test\appdata\roaming\python\python36\site-packages pip
7# aiocache 0.10.0 c:\program files\python36\lib\site-packages
1You cannot just pip install python3 because it is not a library.
2
3If you want to install the latest python3:
4https://www.python.org/ftp/python/3.8.2/python-3.8.2.exe
11. Open start menu and type python
22. Right click on python and select open file location. It will a window in explorer just like below.
33. Again , right click on selected python and select open file location. A window will open and you are now in python’s installation directory.
1Python usually stores its library (and thereby your site-packages folder)
2in the installation directory. So, if you had installed Python to
3C:\Python\, the default library would reside in C:\Python\Lib\
4and third-party modules should be stored in C:\Python\Lib\site-packages.