インフラ系SEの技術メモ

雑なエンジニアが低信頼性のメモを書いています。参考程度にとどめてください。

(Linux)pipのインストールメモ

Debianでインストール

aptでインストールできるのかな?と思いましたができず。

# apt-get install pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package pip

wgetで直接pythonのファイルを落としてくるみたいですね。

# wget https://bootstrap.pypa.io/get-pip.py
--2020-11-08 14:19:24--  https://bootstrap.pypa.io/get-pip.py
Resolving bootstrap.pypa.io (bootstrap.pypa.io)... 
Connecting to bootstrap.pypa.io (bootstrap.pypa.io)|... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1886796 (1.8M) [text/x-python]
Saving to: ‘get-pip.py’

get-pip.py                           100%[===================================================================>]   1.80M  --.-KB/s    in 0.1s

2020-11-08 14:19:24 (12.6 MB/s) - ‘get-pip.py’ saved [1886796/1886796]

でそれをコマンドで叩く

# python3 get-pip.py
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Collecting pip
  Downloading pip-20.2.4-py2.py3-none-any.whl (1.5 MB)
     |████████████████████████████████| 1.5 MB 2.9 MB/s
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 9.0.1
    Uninstalling pip-9.0.1:
      Successfully uninstalled pip-9.0.1
Successfully installed pip-20.2.4

インストールできました。やったね。

# which pip
/usr/local/bin/pip