pip含義
Python包管理工具
pip is the package installer for Python. You can use it to install packages from the Python Package Index and other indexes.
pip install 包名
安裝包
pip install flask==1.1.0 指定安裝版本
pip install -i http://mirrors.aliyun.com/pypi/simple/ flask 指定鏡像地址下載,國內(nèi)會快一些
pip install -r requirement.txt 一次操作安裝文件中所有的包
Install packages from:
PyPI (and other indexes) using requirement specifiers.
VCS project urls.
Local project directories.
Local or remote source archives.
pip also supports installing from “requirements files”, which provide an easy way to specify a whole environment to be installed.
pip uninstall 包名
卸載包
pip uninstall -r requirement.txt 卸載文件中所有的包
pip list
列出已安裝的第三方包,還有版本號
List installed packages, including editables.
Packages are listed in a case-insensitive sorted order.
pip freeze
pip freeze > requirements.txt 將安裝包及版本號 輸出到 文檔中 便于 項目部署安裝環(huán)境使用
Output installed packages in requirements format.
packages are listed in a case-insensitive sorted order.