linux pip的安装路径,pip使用详解(包括pip install安装路径)
1、pip安裝包
# pip install SomePackage
2、pip查看已安裝的包(包括安裝路徑等詳細(xì)信息)
# pip show --files SomePackage
Name:SomePackage
Version:1.0
Location:/my/env/lib/pythonx.x/site-packages
Files:
../somepackage/__init__.py
[...]
3 pip檢查哪些包需要更新
# pip list --outdated
SomePackage (Current: 1.0 Latest: 2.0)
4 pip升級包
# pip install --upgrade SomePackage
[...]
Found existing installation: SomePackage 1.0
Uninstalling SomePackage:
Successfully uninstalled SomePackage
Running setup.py install for SomePackage
Successfully installed SomePackage
5 pip卸載包
$ pip uninstall SomePackage
Uninstalling SomePackage:
/my/env/lib/pythonx.x/site-packages/somepackage
Proceed (y/n)? y
Successfully uninstalled SomePackage
6. pip使用實(shí)例
6.1 安裝redis
# pip install redis
6.2 卸載redis
# pip uninstall redis
Uninstalling redis:
/usr/lib/python2.6/site-packages/redis-2.9.1-py2.6.egg-info
.....省略一些內(nèi)容....
Proceed (y/n)? y
Successfully uninstalled redis
6.3 查看待更新包
pip list --outdate
pygpgme (Current: 0.1 Latest: 0.3)
pycurl (Current: 7.19.0 Latest: 7.19.3.1)
iniparse (Current: 0.3.1 Latest: 0.4)
7. pip參數(shù)解釋
# pip --help
Usage:
pip [options]
Commands:
install???????????????????? 安裝包.
uninstall?????????????????? 卸載包.
freeze????????????????????? 按著一定格式輸出已安裝包列表
list??????????????????????? 列出已安裝包.
show??????????????????????? 顯示包詳細(xì)信息.
search????????????????????? 搜索包,類似yum里的search.
wheel?????????????????????? Build wheels from your requirements.
zip???????????????????????? 不推薦. Zip individual packages.
unzip?????????????????????? 不推薦. Unzip individual packages.
bundle????????????????????? 不推薦. Create pybundles.
help??????????????????????? 當(dāng)前幫助.
General Options:
-h, --help????????????????? 顯示幫助.
-v, --verbose?????????????? 更多的輸出,最多可以使用3次
-V, --version?????????????? 現(xiàn)實(shí)版本信息然后退出.
-q, --quiet???????????????? 最少的輸出.
--log-file ?????????? 覆蓋的方式記錄verbose錯(cuò)誤日志,默認(rèn)文件:/root/.pip/pip.log
--log ??????????????? 不覆蓋記錄verbose輸出的日志.
--proxy ???????????? Specify a proxy in the form [user:passwd@]proxy.server:port.
--timeout ???????????? 連接超時(shí)時(shí)間 (默認(rèn)15秒).
--exists-action ??? Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup.
--cert ?????????????? 證書.
總結(jié)
以上是生活随笔為你收集整理的linux pip的安装路径,pip使用详解(包括pip install安装路径)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 在C#中运用 SQLite
- 下一篇: 鸟哥的Linux私房菜-服务器架设篇