PIP 在哪里存储/保存 Windows 8 上的 Python 3 模块/包?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25522743/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-18 20:20:32  来源:igfitidea点击:

Where does PIP Store / Save Python 3 Modules / Packages on Windows 8?

pythonpip

提问by Startec

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 pythonterminology?

此外,来自pip、模块、库的包还是Python术语中的包?

采纳答案by Startec

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.

Python 通常将其库(以及您的站点包文件夹)存储在安装目录中。因此,如果您已将 Python 安装到 C:\Python\,则默认库将驻留在 C:\Python\Lib\ 中,而第三方模块应存储在 C:\Python\Lib\site-packages 中。

回答by MD5

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

对于 python 3.X 默认位置 C:\Users\username\AppData\Local\Programs\Python\Python36\Lib\site-packages

回答by vladimir

Use this command to list global packageswith 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 environmentthe local packagesis located in project folder:

使用虚拟环境时本地包位于项目文件夹中:

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