当前位置:   article > 正文

python setuptools安装与psutil模块测试_psutil下载离线包只下载不安装

psutil下载离线包只下载不安装


         Python本身自带了一套工具distutils ,用于发布 Python 应用程序。但 distutils 没有提供定义其它依赖包的功能,setuptools 的真正优点并不在于实现distutils 所能实现的功能——尽管它的确增强了distutils的功能并简化了setup.py 脚本中的内容。setuptools 最大的优势是它在包管理能力方面的增强。它可以使用一种更加透明的方法来查找、下载并安装依赖包;并可以在一个包的多个版本中自由进行切换,这些版本都安装在同一个系统上;也可以声明对某个包的特定版本的需求;还可以只使用一个简单的命令就能更新到某个包的最新版本。
         简单来说,Python setuptools可以看做是增强版的distutils,用来管理Python的各种包。

         一般在CentOS系统安装完成后,Python编译器就已经会安装好了,对于setuptools工具的安装,可以用ea_setup.py脚本的方法,自动下载安装包并安装;也可以先下载完整的setuptools安装包,然后再单独安装。

        一、以ez_setup.py脚本方式安装setuptools工具

         使用ez_setup.py脚本的方法比较简单,但要注意服务器要能够联网下载软件包,安装命令为:
# cd /usr/local/src/
# wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py
# python ez_setup.py --insecure

         安装的过程为:

  1. # wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py
  2. --2015-08-27 10:43:48-- https://bootstrap.pypa.io/ez_setup.py
  3. Resolving bootstrap.pypa.io... 103.245.222.175
  4. Connecting to bootstrap.pypa.io|103.245.222.175|:443... connected.
  5. WARNING: certificate common name “*.c.ssl.fastly.net” doesn’t match requested host name “bootstrap.pypa.io”.
  6. HTTP request sent, awaiting response... 200 OK
  7. Length: 11432 (11K) [text/x-python]
  8. Saving to: “ez_setup.py”
  9. 100%[===================================================================>] 11,432 --.-K/s in 0s
  10. 2015-08-27 10:43:49 (692 MB/s) - “ez_setup.py” saved [11432/11432]
  11. #
  12. # python ez_setup.py --insecure
  13. Downloading https://pypi.python.org/packages/source/s/setuptools/setuptools-18.2.zip
  14. Extracting in /tmp/tmpn65Wy1
  15. Now working in /tmp/tmpn65Wy1/setuptools-18.2
  16. Installing Setuptools
  17. running install
  18. running bdist_egg
  19. running egg_info
  20. writing requirements to setuptools.egg-info/requires.txt
  21. writing setuptools.egg-info/PKG-INFO
  22. writing top-level names to setuptools.egg-info/top_level.txt
  23. writing dependency_links to setuptools.egg-info/dependency_links.txt
  24. writing entry points to setuptools.egg-info/entry_points.txt
  25. writing requirements to setuptools.egg-info/requires.txt
  26. writing setuptools.egg-info/PKG-INFO
  27. writing top-level names to setuptools.egg-info/top_level.txt
  28. writing dependency_links to setuptools.egg-info/dependency_links.txt
  29. writing entry points to setuptools.egg-info/entry_points.txt
  30. reading manifest file 'setuptools.egg-info/SOURCES.txt'
  31. reading manifest template 'MANIFEST.in'
  32. writing manifest file 'setuptools.egg-info/SOURCES.txt'
  33. installing library code to build/bdist.linux-x86_64/egg
  34. running install_lib
  35. running build_py
  36. creating build
  37. creating build/lib
  38. copying easy_install.py -> build/lib
  39. creating build/lib/setuptools
  40. copying setuptools/py26compat.py -> build/lib/setuptools
  41. copying setuptools/unicode_utils.py -> build/lib/setuptools
  42. copying setuptools/py31compat.py -> build/lib/setuptools
  43. copying setuptools/windows_support.py -> build/lib/setuptools
  44. copying setuptools/package_index.py -> build/lib/setuptools
  45. copying setuptools/archive_util.py -> build/lib/setuptools
  46. copying setuptools/dist.py -> build/lib/setuptools
  47. copying setuptools/py27compat.py -> build/lib/setuptools
  48. copying setuptools/msvc9_support.py -> build/lib/setuptools
  49. copying setuptools/version.py -> build/lib/setuptools
  50. copying setuptools/compat.py -> build/lib/setuptools
  51. copying setuptools/__init__.py -> build/lib/setuptools
  52. copying setuptools/utils.py -> build/lib/setuptools
  53. copying setuptools/sandbox.py -> build/lib/setuptools
  54. copying setuptools/extension.py -> build/lib/setuptools
  55. copying setuptools/lib2to3_ex.py -> build/lib/setuptools
  56. copying setuptools/depends.py -> build/lib/setuptools
  57. copying setuptools/ssl_support.py -> build/lib/setuptools
  58. copying setuptools/site-patch.py -> build/lib/setuptools
  59. creating build/lib/_markerlib
  60. copying _markerlib/markers.py -> build/lib/_markerlib
  61. copying _markerlib/__init__.py -> build/lib/_markerlib
  62. creating build/lib/pkg_resources
  63. copying pkg_resources/__init__.py -> build/lib/pkg_resources
  64. creating build/lib/setuptools/command
  65. copying setuptools/command/bdist_rpm.py -> build/lib/setuptools/command
  66. copying setuptools/command/develop.py -> build/lib/setuptools/command
  67. copying setuptools/command/build_ext.py -> build/lib/setuptools/command
  68. copying setuptools/command/install.py -> build/lib/setuptools/command
  69. copying setuptools/command/upload_docs.py -> build/lib/setuptools/command
  70. copying setuptools/command/register.py -> build/lib/setuptools/command
  71. copying setuptools/command/build_py.py -> build/lib/setuptools/command
  72. copying setuptools/command/saveopts.py -> build/lib/setuptools/command
  73. copying setuptools/command/alias.py -> build/lib/setuptools/command
  74. copying setuptools/command/install_egg_info.py -> build/lib/setuptools/command
  75. copying setuptools/command/__init__.py -> build/lib/setuptools/command
  76. copying setuptools/command/test.py -> build/lib/setuptools/command
  77. copying setuptools/command/easy_install.py -> build/lib/setuptools/command
  78. copying setuptools/command/rotate.py -> build/lib/setuptools/command
  79. copying setuptools/command/sdist.py -> build/lib/setuptools/command
  80. copying setuptools/command/setopt.py -> build/lib/setuptools/command
  81. copying setuptools/command/egg_info.py -> build/lib/setuptools/command
  82. copying setuptools/command/bdist_egg.py -> build/lib/setuptools/command
  83. copying setuptools/command/install_scripts.py -> build/lib/setuptools/command
  84. copying setuptools/command/install_lib.py -> build/lib/setuptools/command
  85. copying setuptools/command/bdist_wininst.py -> build/lib/setuptools/command
  86. creating build/lib/pkg_resources/_vendor
  87. copying pkg_resources/_vendor/__init__.py -> build/lib/pkg_resources/_vendor
  88. creating build/lib/pkg_resources/_vendor/packaging
  89. copying pkg_resources/_vendor/packaging/_structures.py -> build/lib/pkg_resources/_vendor/packaging
  90. copying pkg_resources/_vendor/packaging/__about__.py -> build/lib/pkg_resources/_vendor/packaging
  91. copying pkg_resources/_vendor/packaging/specifiers.py -> build/lib/pkg_resources/_vendor/packaging
  92. copying pkg_resources/_vendor/packaging/version.py -> build/lib/pkg_resources/_vendor/packaging
  93. copying pkg_resources/_vendor/packaging/__init__.py -> build/lib/pkg_resources/_vendor/packaging
  94. copying pkg_resources/_vendor/packaging/_compat.py -> build/lib/pkg_resources/_vendor/packaging
  95. copying setuptools/script (dev).tmpl -> build/lib/setuptools
  96. copying setuptools/script.tmpl -> build/lib/setuptools
  97. creating build/bdist.linux-x86_64
  98. creating build/bdist.linux-x86_64/egg
  99. creating build/bdist.linux-x86_64/egg/setuptools
  100. copying build/lib/setuptools/py26compat.py -> build/bdist.linux-x86_64/egg/setuptools
  101. creating build/bdist.linux-x86_64/egg/setuptools/command
  102. copying build/lib/setuptools/command/bdist_rpm.py -> build/bdist.linux-x86_64/egg/setuptools/command
  103. copying build/lib/setuptools/command/develop.py -> build/bdist.linux-x86_64/egg/setuptools/command
  104. copying build/lib/setuptools/command/build_ext.py -> build/bdist.linux-x86_64/egg/setuptools/command
  105. copying build/lib/setuptools/command/install.py -> build/bdist.linux-x86_64/egg/setuptools/command
  106. copying build/lib/setuptools/command/upload_docs.py -> build/bdist.linux-x86_64/egg/setuptools/command
  107. copying build/lib/setuptools/command/register.py -> build/bdist.linux-x86_64/egg/setuptools/command
  108. copying build/lib/setuptools/command/build_py.py -> build/bdist.linux-x86_64/egg/setuptools/command
  109. copying build/lib/setuptools/command/saveopts.py -> build/bdist.linux-x86_64/egg/setuptools/command
  110. copying build/lib/setuptools/command/alias.py -> build/bdist.linux-x86_64/egg/setuptools/command
  111. copying build/lib/setuptools/command/install_egg_info.py -> build/bdist.linux-x86_64/egg/setuptools/command
  112. copying build/lib/setuptools/command
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/天景科技苑/article/detail/905043
推荐阅读
相关标签
  

闽ICP备14008679号