使用pip命令安装扩展库
找到需要安装的库的名称,然后使用命令
pip download PackageName 下载库但不安装
pip install Package 安装扩展库
pip install Package == 10.1.2 安装某个库但10.1.2版本(根据需要选择)
pip install Package.whl 带有.whl后缀,安装某扩展库离线包
pip install Package1 Package2... 一次安装扩展库1,2,...
pip install -r requirements.txt 根据后面的文件下载扩展库
pip install --upgrade Package 更新某个库
pip unistall Package 卸载某个库
常见的pip指令可以在终端里面输入pip来查看
(base) hejing@LOGMacBook-Air ~ % pip
Usage:
pip <command> [options]
Commands:
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.
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.
General Options:
-h, --help Show help.