python快速安装模块

  1. #安装pip需要setuptools
  2. yum install -y python-setuptools
  3. #
  4. #安装pip
  5. wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
  6. python get-pip.py
  7.  
  8. 从源码安装
  9. wget https://pypi.python.org/packages/source/p/pip/pip-X.X.tar.gz
  10. tar zxvf pip-X.X.tar.gz
  11. cd pip-X.X
  12. python setup.py install
  13.  
  14. 安装模块,例如markdown
  15. [root@localhost downloads]# pip install markdown
  16. Downloading/unpacking markdown
  17.   Downloading Markdown-2.3.1.tar.gz (267kB): 267kB downloaded
  18.   Running setup.py egg_info for package markdown
  19. Installing collected packages: markdown
  20.   Running setup.py install for markdown
  21.     changing mode of build/scripts-2.6/markdown_py from 644 to 755
  22.     Converting docs/release-2.0.txt -> build/docs/release-2.0.html
  23.     Converting docs/release-2.1.0.txt -> build/docs/release-2.1.0.html
  24.     Converting docs/release-2.0.2.txt -> build/docs/release-2.0.2.html
  25.     Converting docs/reference.txt -> build/docs/reference.html
  26.     Converting docs/release-2.2.0.txt -> build/docs/release-2.2.0.html
  27.     Converting docs/authors.txt -> build/docs/authors.html
  28.     Converting docs/release-2.0.1.txt -> build/docs/release-2.0.1.html
  29.     Converting docs/release-2.1.1.txt -> build/docs/release-2.1.1.html
  30.     Converting docs/change_log.txt -> build/docs/change_log.html
  31.     Converting docs/release-2.3.txt -> build/docs/release-2.3.html
  32.     Converting docs/cli.txt -> build/docs/cli.html
  33.     Converting docs/test_suite.txt -> build/docs/test_suite.html
  34.     Converting docs/index.txt -> build/docs/index.html
  35.     Converting docs/install.txt -> build/docs/install.html
  36.     Converting docs/release-2.2.1.txt -> build/docs/release-2.2.1.html
  37.     Converting docs/siteindex.txt -> build/docs/siteindex.html
  38.     Converting docs/extensions/sane_lists.txt -> build/docs/extensions/sane_lists.html
  39.     Converting docs/extensions/admonition.txt -> build/docs/extensions/admonition.html
  40.     Converting docs/extensions/nl2br.txt -> build/docs/extensions/nl2br.html
  41.     Converting docs/extensions/tables.txt -> build/docs/extensions/tables.html
  42.     Converting docs/extensions/extra.txt -> build/docs/extensions/extra.html
  43.     Converting docs/extensions/fenced_code_blocks.txt -> build/docs/extensions/fenced_code_blocks.html
  44.     Converting docs/extensions/header_id.txt -> build/docs/extensions/header_id.html
  45.     Converting docs/extensions/wikilinks.txt -> build/docs/extensions/wikilinks.html
  46.     Converting docs/extensions/definition_lists.txt -> build/docs/extensions/definition_lists.html
  47.     Converting docs/extensions/footnotes.txt -> build/docs/extensions/footnotes.html
  48.     Converting docs/extensions/api.txt -> build/docs/extensions/api.html
  49.     Converting docs/extensions/smart_strong.txt -> build/docs/extensions/smart_strong.html
  50.     Converting docs/extensions/code_hilite.txt -> build/docs/extensions/code_hilite.html
  51.     Converting docs/extensions/attr_list.txt -> build/docs/extensions/attr_list.html
  52.     Converting docs/extensions/toc.txt -> build/docs/extensions/toc.html
  53.     Converting docs/extensions/meta_data.txt -> build/docs/extensions/meta_data.html
  54.     Converting docs/extensions/abbreviations.txt -> build/docs/extensions/abbreviations.html
  55.     Converting docs/extensions/index.txt -> build/docs/extensions/index.html
  56.     changing mode of /usr/bin/markdown_py to 755
  57. Successfully installed markdown
  58. Cleaning up...
  59. [root@localhost downloads]#

强帖留名: