您的位置:首页 > 编程语言 > Python开发

python软件包管理工具pip的简单使用和说明

2016-11-14 16:18 597 查看
在学习python爬虫的时候需要用到一个builtwith模块,但是我在导入的时候发现没有这个模块,就需要下载这个模块, 有一个很好的工具叫pip,这是python软件包的管理工具,可以安装,卸载,更新软件包。下面让我们一起来看看这个工具把
1:下载并安装pip

[root@python love]# wget http://pypi.python.org/packages/source/s/setuptools/setuptools-2.0.tar.gz [root@python love]# tar -zxf setuptools-2.0.tar.gz
[root@python love]# cd setuptools-2.0/
[root@python setuptools-2.0]# python setup.py build
[root@python setuptools-2.0]# python setup.py install
[root@python love]# wget "https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa333267fb1c922bb" --no-check-certificate
[root@python love]# tar -zxf pip-1.5.4.tar.gz
[root@python love]# cd pip-1.5.4
[root@python pip-1.5.4]# python setup.py install
2:使用pip下载builtwith包
[root@python love]# pip install builtwith
用法:
pip <command> [options]
下边的是通过 [root@python love]# pip --help得到的
Commands:
install Install packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
search Search PyPI for packages.
wheel Build wheels from your requirements.
zip DEPRECATED. Zip individual packages.
unzip DEPRECATED. Unzip individual packages.
bundle DEPRECATED. Create pybundles.
help Show help for commands.

General Options:
-h, --help Show help.
-v, --verbose Give more output. Option is additive, and can be used up
to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output.
--log-file <path> Path to a verbose non-appending log, that only logs
failures. This log is active by default at
/root/.pip/pip.log.
--log <path> Path to a verbose appending log. This log is inactive by
default.
--proxy <proxy> Specify a proxy in the form
[user:passwd@]proxy.server:port.
--timeout <sec> Set the socket timeout (default 15 seconds).
--exists-action <action> Default action when a path already exists: (s)witch,
(i)gnore, (w)ipe, (b)ackup.
--cert <path> Path to alternate CA bundle
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  python pip