美文网首页
【pip】CentOS7.x pip 工具安装

【pip】CentOS7.x pip 工具安装

作者: Bogon | 来源:发表于2023-11-27 17:15 被阅读0次
# pip install httpstat
-bash: pip: command not found


# python  -V
Python 2.7.5


# yum  -y install python-pip
Loaded plugins: fastestmirror, langpacks, versionlock
Loading mirror speeds from cached hostfile
UCloud-Software                                                                                                                                                                                                   | 1.3 kB  00:00:00
base                                                                                                                                                                                                              | 3.6 kB  00:00:00
epel                                                                                                                                                                                                              | 4.7 kB  00:00:00
extras                                                                                                                                                                                                            | 2.9 kB  00:00:00
ucloud                                                                                                                                                                                                            | 1.3 kB  00:00:00
updates                                                                                                                                                                                                           | 2.9 kB  00:00:00
(1/2): epel/x86_64/updateinfo                                                                                                                                                                                     | 1.0 MB  00:00:00
(2/2): epel/x86_64/primary_db                                                                                                                                                                                     | 7.0 MB  00:00:00
Excluding 1 update due to versionlock (use "yum versionlock status" to show it)
Resolving Dependencies
--> Running transaction check
---> Package python2-pip.noarch 0:8.1.2-14.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================
 Package                                                    Arch                                                  Version                                                      Repository                                           Size
=============================================================================================================
Installing:
 python2-pip                                                noarch                                                8.1.2-14.el7                                                 epel                                                1.7 M

Transaction Summary
=============================================================================================================
Install  1 Package

Total download size: 1.7 M
Installed size: 7.2 M
Downloading packages:
python2-pip-8.1.2-14.el7.noarch.rpm                                                                                                                                                                               | 1.7 MB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : python2-pip-8.1.2-14.el7.noarch                                                                                                                                                                                       1/1
  Verifying  : python2-pip-8.1.2-14.el7.noarch                                                                                                                                                                                       1/1

Installed:
  python2-pip.noarch 0:8.1.2-14.el7

Complete!


# yum  info  python2-pip
Loaded plugins: fastestmirror, langpacks, versionlock
Loading mirror speeds from cached hostfile
Excluding 1 update due to versionlock (use "yum versionlock status" to show it)
Installed Packages
Name        : python2-pip
Arch        : noarch
Version     : 8.1.2
Release     : 14.el7
Size        : 7.2 M
Repo        : installed
From repo   : epel
Summary     : A tool for installing and managing Python 2 packages
URL         : http://www.pip-installer.org
License     : MIT and BSD and ASL 2.0 and ISC and Python and (ASL 2.0 or BSD) and LGPLv2+
Description : Pip is a replacement for easy_install.  It uses mostly the
            : same techniques for finding packages, so packages that were made
            : easy_installable should be pip-installable as well.


# rpm -ql python2-pip | grep bin
/usr/bin/pip
/usr/bin/pip2
/usr/bin/pip2.7
# pip install httpstat

Collecting httpstat
  Downloading https://pypi.internal-mirrors.ucloud.cn/packages/b5/a8/c925a81e0c2c6a32c867c648309aeb744077a5ee95e2f604c7fdcc422577/httpstat-1.2.1-py2-none-any.whl
Installing collected packages: httpstat
Successfully installed httpstat-1.2.1


# httpstat   https://www.baidu.com

Connected to 180.101.50.242:443 from 10.23.65.44:32690

HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform
Connection: keep-alive
Content-Length: 2443
Content-Type: text/html
Date: Tue, 28 Nov 2023 09:15:10 GMT
Etag: "588603eb-98b"
Last-Modified: Mon, 23 Jan 2017 13:23:55 GMT
Pragma: no-cache
Server: bfe/1.0.8.18
Set-Cookie: BDORZ=27315; max-age=86400; domain=.baidu.com; path=/

Body stored in: /tmp/tmptVfzTJ

  DNS Lookup   TCP Connection   TLS Handshake   Server Processing   Content Transfer
[    12ms    |      12ms      |     87ms      |       11ms        |        1ms       ]
             |                |               |                   |                  |
    namelookup:12ms           |               |                   |                  |
                        connect:24ms          |                   |                  |
                                    pretransfer:111ms             |                  |
                                                      starttransfer:122ms            |
                                                                                 total:123ms

相关文章

网友评论

      本文标题:【pip】CentOS7.x pip 工具安装

      本文链接:https://www.haomeiwen.com/subject/kdzzwdtx.html