Where does PIP Store / Save Python 3 Modules / Pac

2020-06-01 01:03发布

问题:

I have looked everywhere and can't find where the packages are installed.

Further, are the packages from pip, modules, libraries or just packages in python terminology?

回答1:

for python 3.X default location C:\Users\username \AppData\Local\Programs\Python\Python36\Lib\site-packages



回答2:

From the docs

Python usually stores its library (and thereby your site-packages folder) in the installation directory. So, if you had installed Python to C:\Python\, the default library would reside in C:\Python\Lib\ and third-party modules should be stored in C:\Python\Lib\site-packages.



回答3:

Use this command to list global packages with their locations:

pip list -v

# output example (windows 10):
# Package                   Version   Location                                                         Installer
# ------------------------- --------- ---------------------------------------------------------------- ---------
# adal                      0.4.5     c:\users\test\appdata\roaming\python\python36\site-packages      pip
# aiocache                  0.10.0    c:\program files\python36\lib\site-packages                      pip

When using virtual environment the local packages is located in project folder:

<project folder>\venv\Lib\site-packages


标签: python pip