根据pip命令行出来的有如下功能。
install Install packages.
download Download packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
check Verify installed packages have compatible dependencies.
config Manage local and global configuration.
search Search PyPI for packages.
cache Inspect and manage pip's wheel cache.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
debug Show information useful for debugging.
help Show help for commands.
其中比较常用的是install,show,download,uninstall,freeze等
针对比较常用的列出一些它具体的使用用例,后面有跟参数
最基础的安装
pip install xxx包
带上镜像
pip install xxx -i 镜像
如果是内网开发,可能还需要指定信任主机名,一般是加上镜像地址com及以前的内容
pip install xxx -i xxx.com/yyy --trust-host xxx.com
列出当前文件所需要的第三方库及版本号,创建一个 requirements.txt 文件
pip freeze
根据requirements来安装依赖项
pip install -r requirements.txt
只下载不安装
pip download
卸载包
pip uninstall
标签:功能,requirements,python,xxx,installed,install,pip,packages From: https://www.cnblogs.com/immersed-in-the-deep-sea/p/18185856