pip看这一篇就够了
pip看这一篇就够了
1. pip安装和升级
1.1 pip下载
进入https://pypi.python.org/pypi/pip,下载 .tar.gz压缩包
1.2 Linux安装pip
# tar -xzvf pip-1.5.4.tar.gz 解压
# cd pip-1.5.4 进入解压文件
# python setup.py install 安装
1.3 升级pip
python -m pip install --upgrade pip
2. pip使用详解
2.1 pip安装一个特定的包
pip install 安装包名
2.2 pip查看一个特定的包的版本
pip show --files 安装包名
# 也可以使用: pip show 安装包名
2.3 pip升级一个特定的包
pip install --upgrade 要升级的包名
2.4 pip卸载一个特定的包
pip uninstall 要卸载的包名
2.5 pip检查哪些包需要更新
pip list --outdated
3. pip使用实例
3.1 安装requests
pip install requests
3.2 卸载requests
pip uninstall requests
4. pip参数解释
pip --help
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.
cache Inspect and manage pip's wheel cache.
index Inspect information available from package indexes.
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.
参考文献:https://blog.csdn.net/qq_15260769/article/details/80731407
浙公网安备 33010602011771号