2023年3月25日 星期六

[研究]pip 21.2.3 (軟體包管理系統) 安裝 (Rocky Linux 9.1)

[研究]pip 21.2.3 (軟體包管理系統) 安裝 (Rocky Linux 9.1)

2023-03-25

Pip (軟體包管理系統) - 維基百科,自由的百科全書
https://zh.wikipedia.org/zh-tw/Pip_(%E8%BB%9F%E4%BB%B6%E5%8C%85%E7%AE%A1%E7%90%86%E7%B3%BB%E7%B5%B1)

pip是一個以Python電腦程式語言寫成的軟體包管理系統,他可以安裝和管理軟體包,另外不少的軟體包也可以在「Python軟體包索引」(英語:Python Package Index,PyPI)中找到。許多Python的發行版中已經預裝了pip。

********************************************************************************

查一下 pip 相關套件

[user1@localhost ~]$ sudo yum list | grep pip
libpipeline.x86_64                                   1.5.3-4.el9    @anaconda        
pipewire.x86_64                                      0.3.47-2.el9   @AppStream       
pipewire-alsa.x86_64                                 0.3.47-2.el9   @AppStream       
pipewire-gstreamer.x86_64                            0.3.47-2.el9   @AppStream       
pipewire-jack-audio-connection-kit.x86_64            0.3.47-2.el9   @AppStream       
pipewire-libs.x86_64                                 0.3.47-2.el9   @AppStream       
pipewire-pulseaudio.x86_64                           0.3.47-2.el9   @AppStream       
pipewire-utils.x86_64                                0.3.47-2.el9   @AppStream       
python3-pip.noarch                                   21.2.3-6.el9   @appstream       
python3-pip-wheel.noarch                             21.2.3-6.el9   @anaconda        
libpipeline.i686                                     1.5.3-4.el9    baseos           
micropipenv.noarch                                   1.0.2-5.el9    appstream        
pipewire.i686                                        0.3.47-2.el9   appstream        
pipewire-alsa.i686                                   0.3.47-2.el9   appstream        
pipewire-devel.i686                                  0.3.47-2.el9   appstream        
pipewire-devel.x86_64                                0.3.47-2.el9   appstream        
pipewire-gstreamer.i686                              0.3.47-2.el9   appstream        
pipewire-jack-audio-connection-kit.i686              0.3.47-2.el9   appstream        
pipewire-jack-audio-connection-kit-devel.i686        0.3.47-2.el9   appstream        
pipewire-jack-audio-connection-kit-devel.x86_64      0.3.47-2.el9   appstream        
pipewire-libs.i686                                   0.3.47-2.el9   appstream        
waypipe.x86_64                                       0.8.2-1.el9    appstream        

[user1@localhost ~]$

安裝


[user1@localhost ~]$ sudo yum -y install pip
Last metadata expiration check: 0:13:57 ago on Sat 25 Mar 2023 09:09:35 AM CST.
Dependencies resolved.
===================================================================================================================
 Package                     Architecture           Version                        Repository                 Size
===================================================================================================================
Installing:
 python3-pip                 noarch                 21.2.3-6.el9                   appstream                 1.7 M

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

Total download size: 1.7 M
Installed size: 8.7 M
Downloading Packages:
python3-pip-21.2.3-6.el9.noarch.rpm                                                1.8 MB/s | 1.7 MB     00:00    
-------------------------------------------------------------------------------------------------------------------
Total                                                                              988 kB/s | 1.7 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                           1/1 
  Installing       : python3-pip-21.2.3-6.el9.noarch                                                           1/1 
  Running scriptlet: python3-pip-21.2.3-6.el9.noarch                                                           1/1 
  Verifying        : python3-pip-21.2.3-6.el9.noarch                                                           1/1 

Installed:
  python3-pip-21.2.3-6.el9.noarch                                                                                  

Complete!

[user1@localhost ~]$

檢視版本

[user1@localhost ~]$ pip -V
pip 21.2.3 from /usr/lib/python3.9/site-packages/pip (python 3.9)

[user1@localhost ~]$

指令、參數列表

[user1@localhost ~]$ pip

Usage:   
  pip <command> [options]

Commands:
  install                     Install packages.
  download                    Download packages.
  uninstall                   Uninstall packages.
  freeze                      Output installed packages in requirements format.
  list                        List installed packages.
  show                        Show information about installed packages.
  check                       Verify installed packages have compatible dependencies.
  config                      Manage local and global configuration.
  search                      Search PyPI for packages.
  cache                       Inspect and manage pip's wheel cache.
  index                       Inspect information available from package indexes.
  wheel                       Build wheels from your requirements.
  hash                        Compute hashes of package archives.
  completion                  A helper command used for command completion.
  debug                       Show information useful for debugging.
  help                        Show help for commands.

General Options:
  -h, --help                  Show help.
  --isolated                  Run pip in an isolated mode, ignoring environment variables and user configuration.
  -v, --verbose               Give more output. Option is additive, and can be used up to 3 times.
  -V, --version               Show version and exit.
  -q, --quiet                 Give less output. Option is additive, and can be used up to 3 times (corresponding
                              to WARNING, ERROR, and CRITICAL logging levels).
  --log <path>                Path to a verbose appending log.
  --no-input                  Disable prompting for input.
  --proxy <proxy>             Specify a proxy in the form [user:passwd@]proxy.server:port.
  --retries <retries>         Maximum number of retries each connection should attempt (default 5 times).
  --timeout <sec>             Set the socket timeout (default 15 seconds).
  --exists-action <action>    Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup,
                              (a)bort.
  --trusted-host <hostname>   Mark this host or host:port pair as trusted, even though it does not have valid or
                              any HTTPS.
  --cert <path>               Path to PEM-encoded CA certificate bundle. If provided, overrides the default. See
                              'SSL Certificate Verification' in pip documentation for more information.
  --client-cert <path>        Path to SSL client certificate, a single file containing the private key and the
                              certificate in PEM format.
  --cache-dir <dir>           Store the cache data in <dir>.
  --no-cache-dir              Disable the cache.
  --disable-pip-version-check
                              Don't periodically check PyPI to determine whether a new version of pip is
                              available for download. Implied with --no-index.
  --no-color                  Suppress colored output.
  --no-python-version-warning
                              Silence deprecation warnings for upcoming unsupported Pythons.
  --use-feature <feature>     Enable new functionality, that may be backward incompatible.
  --use-deprecated <feature>  Enable deprecated functionality, that will be removed in the future.
  
[user1@localhost ~]$ 

常用的就是 install。

(完)

相關

[研究]pip 21.2.3 (軟體包管理系統) 安裝 (Ubuntu 22.04.2 LTS)
https://shaurong.blogspot.com/2023/03/pip-2202-ubuntu-22042-lts.html

[研究]pip 21.2.3 (軟體包管理系統) 安裝 (Rocky Linux 9.1)
https://shaurong.blogspot.com/2023/03/pip-2123-rocky-linux-91.html

沒有留言:

張貼留言