pip 是“A tool for installing and managing Python packages.”,也就是说pip是python的软件安装工具
2、下面介绍怎么在linux下安装pip
下载pip到/usr/local/src
# cd /usr/local/src
# wget "https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa333267fb1c922bb" --no-check-certificate
如果提示:-bash: wget: command not found
那么安装wget,执行如下:
# yum -y install wget
解夺安装pip
# tar -xzvf pip-1.5.4.tar.gz
# cd pip-1.5.4
# python setup.py install
如果安装报下面的错:
Traceback (most recent call last):
File "setup.py", line 6, in <module>
from setuptools import setup, find_packages
ImportError: No module named setuptools
那么就要先安装setuptools包
(1)下载setuptools包
# wget http://pypi.python.org/packages/source/s/setuptools/setuptools-2.0.tar.gz
(2)解压setuptools包
# tar zxvf setuptools-2.0.tar.gz
# cd setuptools-2.0
(3)编译setuptools
# python setup.py build
(4)开始执行setuptools安装
# python setup.py install
安装完成setuptools包后,在重新执行:
# cd /usr/local/src/pip-1.5.4
# python setup.py install
至此pip安装完成
3、linux下pip使用参数
# pip --help
Usage:
pip <command>[options]
Commands:
install Install packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
listList installed packages.
showShow 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.
helpShow 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.
本人经过一天苦读。也没装上linux,第二天找了些工具帮忙,终于用最弱智得办法成功得安装了linux,首先到红旗官网上下载个iso镜像系统,我用得是linux6.0,只有一个iso文件,大小没到700mb,腾出一个分区且大小在10g左右然后只需要下载Avlgomgr和bootmagic两个共享程序就可以了(到gougou.com上下载,都能找到),avlgomgr版本新点得最好,旧版本容易出问题。最后上网看看linux怎么分区(记住要手动分区而且不能把iso文件所在得分区删除)网上有相关视频(或者搜下)pu准备工作已经做好了。下面按照步骤来,1 .把下载得iso系统放到fat32分区得根目录下(比如d盘是fat32.只要放在d:&#92; 就行了,注意最好把iso 文件 重命名,名字越短越好。然后打开avlgomgr,在虚拟磁盘上打钩,然后找到iso文件路径,然后点击装载即可,boot.ini文件位置已经默认了,不用改变。路径就是x:&#92;boot.ini(x为系统所在盘符)。然后点击装配。然后重启电脑。2。开机按方向键(上下),选择新出来得选项。然后加载iso进行安装。*一定要注意分区*然后就是漫长得等待。我得配置相当得低。等了差不多2小时。(本人电脑mqu螅淠诖妫玻担叮恚狻#悖澹欤澹颍铮畹ズ恕。保保纾瑁W⒁庾安僮飨低呈彼心闶淙氲谩7裨蛳低匙昂媚憬蝗ァ#欤椋睿酰低车贸豆芾碓闭屎盼颍铮铮簦闶淙氲糜Ω檬敲苈搿#常昂煤竽闶墙蝗サ谩3悄惆言吹牟僮飨低掣哺恰H绻悄茄椭苯酉乱徊剑裨蚪朐吹孟低常蚩猓铮铮簦恚幔纾椋恪H缓蟮悖螅幔觯濉。幔螅匦缕舳纯煽吹剑欤椋睿酰#常。矗讼低澈臀⑷硐低惩耆灰谎龊眯睦碜急浮W叭砑嫉醚В∽ⅲ赫馐潜救说谝淮巫埃欤椋睿酰低常彩堑谝淮涡凑飧觥P吹貌缓们肓陆馊绻写砦蟮们敫嫠呶遥ㄎ矣谜夥椒ò沧俺晒α耍1救耍眩眩海玻罚埃常担常埃福?欢迎分享,转载请注明来源:内存溢出
评论列表(0条)