Python easy_install工具安装


在安装python第三方类库时,python提供了一个类似于yum的命令easy_install,但是系统一般都是不会自带easy_install命令的,故将easy_install命令的安装方法介绍如下:

   1)下载setuptools:

  1. wget http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c11-py2.4.egg#md5=bd639f9b0eac4c42497034dec2ec0c2b  
   2)安装setuptools
  1. sh setuptools-0.6c11-py2.4.egg  
   3)测试easy_install命令

[sql] view plaincopyprint?

  1. [root@Hadoopmaster-177 ~]# easy_install --help   
  2. Global options:  
  3.   --verbose (-v)  run verbosely (default)   
  4.   --quiet (-q)    run quietly (turns verbosity off)   
  5.   --dry-run (-n)  don't actually do anything   
  6.   --help (-h)     show detailed help message   
  7.   
  8. Options for 'easy_install' command:  
  9.   --prefix                       installation prefix   
  10.   --zip-ok (-z)                  install package as a zipfile   
  11.   --multi-version (-m)           make apps have to require() a version   
  12.   --upgrade (-U)                 force upgrade (searches PyPI for latest   
  13.                                  versions)  
  14.   --install-dir (-d)             install package to DIR   
  15.   --script-dir (-s)              install scripts to DIR   
  16.   --exclude-scripts (-x)         Don't install scripts   
  17.   --always-copy (-a)             Copy all needed packages to install dir   
  18.   --index-url (-i)               base URL of Python Package Index   
  19.   --find-links (-f)              additional URL(s) to search for packages   
  20.   --delete-conflicting (-D)      no longer needed; don't use this   
  21.   --ignore-conflicts-at-my-risk  no longer needed; don't use this   
  22.   --build-directory (-b)         download/extract/build in DIR; keep the   
  23.                                  results  
  24.   --optimize (-O)                also compile with optimization: -O1 for   
  25.                                  "python -O", -O2 for "python -OO"and -O0 to  
  26.                                  disable [default: -O0]  
  27.   --record                       filename in which to record list of installed   
  28.                                  files  
  29.   --always-unzip (-Z)            don't install as a zipfile, no matter what   
  30.   --site-dirs (-S)               list of directories where .pth files work   
  31.   --editable (-e)                Install specified packages in editable form   
  32.   --no-deps (-N)                 don't install dependencies   
  33.   --allow-hosts (-H)             pattern(s) that hostnames must match   
  34.   --local-snapshots-ok (-l)      allow building eggs from local checkouts   
  35.   
  36. usage: easy_install [options] requirement_or_url ...  
  37.    or: easy_install --help  

相关内容