歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Python easy_install工具安裝

Python easy_install工具安裝

日期:2017/2/28 15:53:41   编辑:Linux教程
在安裝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. Options for 'easy_install' command:
  8. --prefix installation prefix
  9. --zip-ok (-z) install package as a zipfile
  10. --multi-version (-m) make apps have to require() a version
  11. --upgrade (-U) force upgrade (searches PyPI for latest
  12. versions)
  13. --install-dir (-d) install package to DIR
  14. --script-dir (-s) install scripts to DIR
  15. --exclude-scripts (-x) Don't install scripts
  16. --always-copy (-a) Copy all needed packages to install dir
  17. --index-url (-i) base URL of Python Package Index
  18. --find-links (-f) additional URL(s) to search for packages
  19. --delete-conflicting (-D) no longer needed; don't use this
  20. --ignore-conflicts-at-my-risk no longer needed; don't use this
  21. --build-directory (-b) download/extract/build in DIR; keep the
  22. results
  23. --optimize (-O) also compile with optimization: -O1 for
  24. "python -O", -O2 for "python -OO", and -O0 to
  25. disable [default: -O0]
  26. --record filename in which to record list of installed
  27. files
  28. --always-unzip (-Z) don't install as a zipfile, no matter what
  29. --site-dirs (-S) list of directories where .pth files work
  30. --editable (-e) Install specified packages in editable form
  31. --no-deps (-N) don't install dependencies
  32. --allow-hosts (-H) pattern(s) that hostnames must match
  33. --local-snapshots-ok (-l) allow building eggs from local checkouts
  34. usage: easy_install [options] requirement_or_url ...
  35. or: easy_install --help
Copyright © Linux教程網 All Rights Reserved