WSLへのpip3のインストール

# 概要
WSL上にpip3をインストールする方法

# 環境
Windows10 Pro
バージョン 1803
WSL ... Ubuntu 18.04 LTS

[WSLのインストール方法](https://qiita.com/tkj06/items/b5c195db860241663485)

# aptコマンド毎回忘れる人(私)のための参考ページ
https://linuxfan.info/package-management-ubuntu

# pythonのインストール状況確認
## python3の確認
```bash:python3のインストール状況確認
# python3デフォルトで入ってる
$ python3 --version
Python 3.6.5

$ which python3
/usr/bin/python3

# 2系はなさそう
$ python --version
Command 'python' not found, but can be installed with:

sudo apt install python3
sudo apt install python
sudo apt install python-minimal

You also have python3 installed, you can run 'python3' instead.
```

# pip3のインストール
## 確認
```bash:pip3のインストール状況確認
$ pip3
# 入ってません
Command 'pip3' not found, but can be installed with:

sudo apt install python3-pip
```

## インストール
### dry-run するとなぜかエラーが出そうな予感

```bash:dry-runするとエラー
$ sudo apt install --just-print python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3-pip
```

### E: Unable to locate package python3-pip の解消
[ここ](https://review-of-my-life.blogspot.com/2018/03/python-unable-to-locate-package.html) を参考に updateする。

```bash:パッケージ情報の更新
$ sudo apt update
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [8570 kB]
Get:6 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [320 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic/universe Translation-en [4941 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [151 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic/multiverse Translation-en [108 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [578 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [214 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [6996 B]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/restricted Translation-en [3076 B]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [861 kB]
Get:15 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [115 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [261 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [6636 B]
Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse Translation-en [3556 B]
Get:19 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [1024 B]
Get:20 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [4296 B]
Get:21 http://archive.ubuntu.com/ubuntu bionic-backports/main Translation-en [448 B]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/restricted Translation-en [2192 B]
Get:23 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [3468 B]
Get:24 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [240 kB]
Get:25 http://archive.ubuntu.com/ubuntu bionic-backports/universe Translation-en [1604 B]
Get:26 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [137 kB]
Get:27 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [4008 B]
Get:28 http://security.ubuntu.com/ubuntu bionic-security/multiverse Translation-en [2060 B]
Fetched 16.8 MB in 10s (1683 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
181 packages can be upgraded. Run 'apt list --upgradable' to see them.
```

update後は大丈夫そうです

```bash:dry-run成功
$ sudo apt install --just-print python3-pip
[sudo] password for unix_user:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libfreetype6
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu build-essential cpp cpp-7 dh-python dpkg-dev fakeroot g++ g++-7 gcc
  gcc-7 gcc-7-base gcc-8-base libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1
  libbinutils libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libdpkg-perl libexpat1-dev libfakeroot libfile-fcntllock-perl
  libgcc-7-dev libgcc1 libgomp1 libisl19 libitm1 liblsan0 libmpc3 libmpx2 libpython3-dev libpython3-stdlib libpython3.6
  libpython3.6-dev libpython3.6-minimal libpython3.6-stdlib libquadmath0 libstdc++-7-dev libstdc++6 libtsan0 libubsan0
  linux-libc-dev make manpages-dev python-pip-whl python3 python3-crypto python3-dev python3-distutils python3-keyring
  python3-keyrings.alt python3-lib2to3 python3-minimal python3-secretstorage python3-setuptools python3-wheel python3-xdg
  python3.6 python3.6-dev python3.6-minimal
Suggested packages:
  binutils-doc cpp-doc gcc-7-locales debian-keyring g++-multilib g++-7-multilib gcc-7-doc libstdc++6-7-dbg gcc-multilib
  autoconf automake libtool flex bison gdb gcc-doc gcc-7-multilib libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg
  libasan4-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg glibc-doc bzr
  libstdc++-7-doc make-doc python3-doc python3-tk python3-venv python-crypto-doc gnome-keyring libkf5wallet-bin
  gir1.2-gnomekeyring-1.0 python-secretstorage-doc python-setuptools-doc python3.6-venv python3.6-doc binfmt-support
The following NEW packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu build-essential cpp cpp-7 dh-python dpkg-dev fakeroot g++ g++-7 gcc
  gcc-7 gcc-7-base libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1 libbinutils
  libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libdpkg-perl libexpat1-dev libfakeroot libfile-fcntllock-perl libgcc-7-dev
  libgomp1 libisl19 libitm1 liblsan0 libmpc3 libmpx2 libpython3-dev libpython3.6-dev libquadmath0 libstdc++-7-dev libtsan0
  libubsan0 linux-libc-dev make manpages-dev python-pip-whl python3-crypto python3-dev python3-distutils python3-keyring
  python3-keyrings.alt python3-lib2to3 python3-pip python3-secretstorage python3-setuptools python3-wheel python3-xdg
  python3.6-dev
The following packages will be upgraded:
  gcc-8-base libgcc1 libpython3-stdlib libpython3.6 libpython3.6-minimal libpython3.6-stdlib libstdc++6 python3
  python3-minimal python3.6 python3.6-minimal
11 upgraded, 57 newly installed, 0 to remove and 170 not upgraded.
Inst python3.6 [3.6.5-3] (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64]) []
Inst libpython3.6 [3.6.5-3] (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64]) []
Inst libpython3.6-stdlib [3.6.5-3] (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64]) []
Inst python3.6-minimal [3.6.5-3] (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64]) []
Inst libpython3.6-minimal [3.6.5-3] (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf libpython3.6-minimal (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf python3.6-minimal (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst python3-minimal [3.6.5-3ubuntu1] (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64]) [python3:amd64 on python3-minimal:amd64] [python3:amd64 ]
Conf python3-minimal (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64]) [python3:amd64 ]
Inst python3 [3.6.5-3ubuntu1] (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64]) []
Inst libpython3-stdlib [3.6.5-3ubuntu1] (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst gcc-8-base [8-20180414-1ubuntu2] (8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64]) [libgcc1:amd64 libstdc++6:amd64 ]
Conf gcc-8-base (8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64]) [libgcc1:amd64 libstdc++6:amd64 ]
Inst libstdc++6 [8-20180414-1ubuntu2] (8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64]) [libgcc1:amd64 ]
Conf libstdc++6 (8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64]) [libgcc1:amd64 ]
Inst libgcc1 [1:8-20180414-1ubuntu2] (1:8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf libgcc1 (1:8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst binutils-common (2.30-21ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst libbinutils (2.30-21ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst binutils-x86-64-linux-gnu (2.30-21ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst binutils (2.30-21ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst libc-dev-bin (2.27-3ubuntu1 Ubuntu:18.04/bionic [amd64])
Inst linux-libc-dev (4.15.0-47.50 Ubuntu:18.04/bionic-updates, Ubuntu:18.04/bionic-security [amd64])
Inst libc6-dev (2.27-3ubuntu1 Ubuntu:18.04/bionic [amd64])
Inst gcc-7-base (7.3.0-27ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst libisl19 (0.19-1 Ubuntu:18.04/bionic [amd64])
Inst libmpc3 (1.1.0-1 Ubuntu:18.04/bionic [amd64])
Inst cpp-7 (7.3.0-27ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst cpp (4:7.3.0-3ubuntu2.1 Ubuntu:18.04/bionic-updates [amd64])
Inst libcc1-0 (8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst libgomp1 (8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst libitm1 (8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst libatomic1 (8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst libasan4 (7.3.0-27ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst liblsan0 (8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst libtsan0 (8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst libubsan0 (7.3.0-27ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst libcilkrts5 (7.3.0-27ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst libmpx2 (8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst libquadmath0 (8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst libgcc-7-dev (7.3.0-27ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst gcc-7 (7.3.0-27ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst gcc (4:7.3.0-3ubuntu2.1 Ubuntu:18.04/bionic-updates [amd64])
Inst libstdc++-7-dev (7.3.0-27ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst g++-7 (7.3.0-27ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst g++ (4:7.3.0-3ubuntu2.1 Ubuntu:18.04/bionic-updates [amd64])
Inst make (4.1-9.1ubuntu1 Ubuntu:18.04/bionic [amd64])
Inst libdpkg-perl (1.19.0.5ubuntu2.1 Ubuntu:18.04/bionic-updates [all])
Inst dpkg-dev (1.19.0.5ubuntu2.1 Ubuntu:18.04/bionic-updates [all])
Inst build-essential (12.4ubuntu1 Ubuntu:18.04/bionic [amd64])
Inst python3-lib2to3 (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [all])
Inst python3-distutils (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [all])
Inst dh-python (3.20180325ubuntu2 Ubuntu:18.04/bionic [all])
Inst libfakeroot (1.22-2ubuntu1 Ubuntu:18.04/bionic [amd64])
Inst fakeroot (1.22-2ubuntu1 Ubuntu:18.04/bionic [amd64])
Inst libalgorithm-diff-perl (1.19.03-1 Ubuntu:18.04/bionic [all])
Inst libalgorithm-diff-xs-perl (0.04-5 Ubuntu:18.04/bionic [amd64])
Inst libalgorithm-merge-perl (0.08-3 Ubuntu:18.04/bionic [all])
Inst libexpat1-dev (2.2.5-3 Ubuntu:18.04/bionic [amd64])
Inst libfile-fcntllock-perl (0.22-3build2 Ubuntu:18.04/bionic [amd64])
Inst libpython3.6-dev (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst libpython3-dev (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst manpages-dev (4.15-1 Ubuntu:18.04/bionic [all])
Inst python-pip-whl (9.0.1-2.3~ubuntu1 Ubuntu:18.04/bionic-updates [all])
Inst python3-crypto (2.6.1-8ubuntu2 Ubuntu:18.04/bionic [amd64])
Inst python3.6-dev (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst python3-dev (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Inst python3-secretstorage (2.3.1-2 Ubuntu:18.04/bionic [all])
Inst python3-keyring (10.6.0-1 Ubuntu:18.04/bionic [all])
Inst python3-keyrings.alt (3.0-1 Ubuntu:18.04/bionic [all])
Inst python3-pip (9.0.1-2.3~ubuntu1 Ubuntu:18.04/bionic-updates [all])
Inst python3-setuptools (39.0.1-2 Ubuntu:18.04/bionic [all])
Inst python3-wheel (0.30.0-0.2 Ubuntu:18.04/bionic [all])
Inst python3-xdg (0.25-4ubuntu1 Ubuntu:18.04/bionic [all])
Conf python3.6 (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf libpython3.6 (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf libpython3.6-stdlib (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf python3 (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf libpython3-stdlib (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf binutils-common (2.30-21ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf libbinutils (2.30-21ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf binutils-x86-64-linux-gnu (2.30-21ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf binutils (2.30-21ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf libc-dev-bin (2.27-3ubuntu1 Ubuntu:18.04/bionic [amd64])
Conf linux-libc-dev (4.15.0-47.50 Ubuntu:18.04/bionic-updates, Ubuntu:18.04/bionic-security [amd64])
Conf libc6-dev (2.27-3ubuntu1 Ubuntu:18.04/bionic [amd64])
Conf gcc-7-base (7.3.0-27ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf libisl19 (0.19-1 Ubuntu:18.04/bionic [amd64])
Conf libmpc3 (1.1.0-1 Ubuntu:18.04/bionic [amd64])
Conf cpp-7 (7.3.0-27ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf cpp (4:7.3.0-3ubuntu2.1 Ubuntu:18.04/bionic-updates [amd64])
Conf libcc1-0 (8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf libgomp1 (8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf libitm1 (8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf libatomic1 (8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf libasan4 (7.3.0-27ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf liblsan0 (8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf libtsan0 (8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf libubsan0 (7.3.0-27ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf libcilkrts5 (7.3.0-27ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf libmpx2 (8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf libquadmath0 (8.2.0-1ubuntu2~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf libgcc-7-dev (7.3.0-27ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf gcc-7 (7.3.0-27ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf gcc (4:7.3.0-3ubuntu2.1 Ubuntu:18.04/bionic-updates [amd64])
Conf libstdc++-7-dev (7.3.0-27ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf g++-7 (7.3.0-27ubuntu1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf g++ (4:7.3.0-3ubuntu2.1 Ubuntu:18.04/bionic-updates [amd64])
Conf make (4.1-9.1ubuntu1 Ubuntu:18.04/bionic [amd64])
Conf libdpkg-perl (1.19.0.5ubuntu2.1 Ubuntu:18.04/bionic-updates [all])
Conf dpkg-dev (1.19.0.5ubuntu2.1 Ubuntu:18.04/bionic-updates [all])
Conf build-essential (12.4ubuntu1 Ubuntu:18.04/bionic [amd64])
Conf python3-lib2to3 (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [all])
Conf python3-distutils (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [all])
Conf dh-python (3.20180325ubuntu2 Ubuntu:18.04/bionic [all])
Conf libfakeroot (1.22-2ubuntu1 Ubuntu:18.04/bionic [amd64])
Conf fakeroot (1.22-2ubuntu1 Ubuntu:18.04/bionic [amd64])
Conf libalgorithm-diff-perl (1.19.03-1 Ubuntu:18.04/bionic [all])
Conf libalgorithm-diff-xs-perl (0.04-5 Ubuntu:18.04/bionic [amd64])
Conf libalgorithm-merge-perl (0.08-3 Ubuntu:18.04/bionic [all])
Conf libexpat1-dev (2.2.5-3 Ubuntu:18.04/bionic [amd64])
Conf libfile-fcntllock-perl (0.22-3build2 Ubuntu:18.04/bionic [amd64])
Conf libpython3.6-dev (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf libpython3-dev (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf manpages-dev (4.15-1 Ubuntu:18.04/bionic [all])
Conf python-pip-whl (9.0.1-2.3~ubuntu1 Ubuntu:18.04/bionic-updates [all])
Conf python3-crypto (2.6.1-8ubuntu2 Ubuntu:18.04/bionic [amd64])
Conf python3.6-dev (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf python3-dev (3.6.7-1~18.04 Ubuntu:18.04/bionic-updates [amd64])
Conf python3-secretstorage (2.3.1-2 Ubuntu:18.04/bionic [all])
Conf python3-keyring (10.6.0-1 Ubuntu:18.04/bionic [all])
Conf python3-keyrings.alt (3.0-1 Ubuntu:18.04/bionic [all])
Conf python3-pip (9.0.1-2.3~ubuntu1 Ubuntu:18.04/bionic-updates [all])
Conf python3-setuptools (39.0.1-2 Ubuntu:18.04/bionic [all])
Conf python3-wheel (0.30.0-0.2 Ubuntu:18.04/bionic [all])
Conf python3-xdg (0.25-4ubuntu1 Ubuntu:18.04/bionic [all])
```


### 改めてpip3をインストール
うまくいきました

```bash:pip3インストール
$ sudo apt install python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libfreetype6
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu build-essential cpp cpp-7 dh-python dpkg-dev fakeroot g++ g++-7 gcc
  gcc-7 gcc-7-base gcc-8-base libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1
  libbinutils libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libdpkg-perl libexpat1-dev libfakeroot libfile-fcntllock-perl
  libgcc-7-dev libgcc1 libgomp1 libisl19 libitm1 liblsan0 libmpc3 libmpx2 libpython3-dev libpython3-stdlib libpython3.6
  libpython3.6-dev libpython3.6-minimal libpython3.6-stdlib libquadmath0 libstdc++-7-dev libstdc++6 libtsan0 libubsan0
  linux-libc-dev make manpages-dev python-pip-whl python3 python3-crypto python3-dev python3-distutils python3-keyring
  python3-keyrings.alt python3-lib2to3 python3-minimal python3-secretstorage python3-setuptools python3-wheel python3-xdg
  python3.6 python3.6-dev python3.6-minimal
Suggested packages:
  binutils-doc cpp-doc gcc-7-locales debian-keyring g++-multilib g++-7-multilib gcc-7-doc libstdc++6-7-dbg gcc-multilib
  autoconf automake libtool flex bison gdb gcc-doc gcc-7-multilib libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg
  libasan4-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg glibc-doc bzr
  libstdc++-7-doc make-doc python3-doc python3-tk python3-venv python-crypto-doc gnome-keyring libkf5wallet-bin
  gir1.2-gnomekeyring-1.0 python-secretstorage-doc python-setuptools-doc python3.6-venv python3.6-doc binfmt-support
The following NEW packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu build-essential cpp cpp-7 dh-python dpkg-dev fakeroot g++ g++-7 gcc
  gcc-7 gcc-7-base libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1 libbinutils
  libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libdpkg-perl libexpat1-dev libfakeroot libfile-fcntllock-perl libgcc-7-dev
  libgomp1 libisl19 libitm1 liblsan0 libmpc3 libmpx2 libpython3-dev libpython3.6-dev libquadmath0 libstdc++-7-dev libtsan0
  libubsan0 linux-libc-dev make manpages-dev python-pip-whl python3-crypto python3-dev python3-distutils python3-keyring
  python3-keyrings.alt python3-lib2to3 python3-pip python3-secretstorage python3-setuptools python3-wheel python3-xdg
  python3.6-dev
The following packages will be upgraded:
  gcc-8-base libgcc1 libpython3-stdlib libpython3.6 libpython3.6-minimal libpython3.6-stdlib libstdc++6 python3
  python3-minimal python3.6 python3.6-minimal
11 upgraded, 57 newly installed, 0 to remove and 170 not upgraded.
Need to get 91.2 MB of archives.
After this operation, 247 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6 amd64 3.6.7-1~18.04 [197 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6 amd64 3.6.7-1~18.04 [1415 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-stdlib amd64 3.6.7-1~18.04 [1711 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6-minimal amd64 3.6.7-1~18.04 [1604 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-minimal amd64 3.6.7-1~18.04 [531 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-minimal amd64 3.6.7-1~18.04 [23.7 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3 amd64 3.6.7-1~18.04 [47.2 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3-stdlib amd64 3.6.7-1~18.04 [7240 B]
Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-8-base amd64 8.2.0-1ubuntu2~18.04 [18.3 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libstdc++6 amd64 8.2.0-1ubuntu2~18.04 [398 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgcc1 amd64 1:8.2.0-1ubuntu2~18.04 [40.7 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-common amd64 2.30-21ubuntu1~18.04 [193 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libbinutils amd64 2.30-21ubuntu1~18.04 [502 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-x86-64-linux-gnu amd64 2.30-21ubuntu1~18.04 [1855 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils amd64 2.30-21ubuntu1~18.04 [3392 B]
Get:16 http://archive.ubuntu.com/ubuntu bionic/main amd64 libc-dev-bin amd64 2.27-3ubuntu1 [71.8 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-libc-dev amd64 4.15.0-47.50 [1008 kB]
Get:18 http://archive.ubuntu.com/ubuntu bionic/main amd64 libc6-dev amd64 2.27-3ubuntu1 [2587 kB]
Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-7-base amd64 7.3.0-27ubuntu1~18.04 [18.9 kB]
Get:20 http://archive.ubuntu.com/ubuntu bionic/main amd64 libisl19 amd64 0.19-1 [551 kB]
Get:21 http://archive.ubuntu.com/ubuntu bionic/main amd64 libmpc3 amd64 1.1.0-1 [40.8 kB]
Get:22 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 cpp-7 amd64 7.3.0-27ubuntu1~18.04 [6738 kB]
Get:23 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 cpp amd64 4:7.3.0-3ubuntu2.1 [27.6 kB]
Get:24 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcc1-0 amd64 8.2.0-1ubuntu2~18.04 [39.5 kB]
Get:25 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgomp1 amd64 8.2.0-1ubuntu2~18.04 [76.4 kB]
Get:26 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libitm1 amd64 8.2.0-1ubuntu2~18.04 [28.1 kB]
Get:27 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libatomic1 amd64 8.2.0-1ubuntu2~18.04 [9064 B]
Get:28 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libasan4 amd64 7.3.0-27ubuntu1~18.04 [358 kB]
Get:29 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 liblsan0 amd64 8.2.0-1ubuntu2~18.04 [132 kB]
Get:30 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libtsan0 amd64 8.2.0-1ubuntu2~18.04 [288 kB]
Get:31 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libubsan0 amd64 7.3.0-27ubuntu1~18.04 [126 kB]
Get:32 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcilkrts5 amd64 7.3.0-27ubuntu1~18.04 [42.5 kB]
Get:33 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmpx2 amd64 8.2.0-1ubuntu2~18.04 [11.7 kB]
Get:34 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libquadmath0 amd64 8.2.0-1ubuntu2~18.04 [133 kB]
Get:35 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgcc-7-dev amd64 7.3.0-27ubuntu1~18.04 [2380 kB]
Get:36 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-7 amd64 7.3.0-27ubuntu1~18.04 [7455 kB]
Get:37 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc amd64 4:7.3.0-3ubuntu2.1 [5184 B]
Get:38 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libstdc++-7-dev amd64 7.3.0-27ubuntu1~18.04 [1463 kB]
Setting up python3-wheel (0.30.0-0.2) ...
Setting up fakeroot (1.22-2ubuntu1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Setting up libgcc-7-dev:amd64 (7.3.0-27ubuntu1~18.04) ...
Setting up cpp-7 (7.3.0-27ubuntu1~18.04) ...
Setting up libstdc++-7-dev:amd64 (7.3.0-27ubuntu1~18.04) ...
Setting up libalgorithm-merge-perl (0.08-3) ...
Setting up libalgorithm-diff-xs-perl (0.04-5) ...
Setting up libexpat1-dev:amd64 (2.2.5-3) ...
Setting up python3-lib2to3 (3.6.7-1~18.04) ...
Setting up python3-secretstorage (2.3.1-2) ...
Setting up python3-distutils (3.6.7-1~18.04) ...
Setting up binutils-x86-64-linux-gnu (2.30-21ubuntu1~18.04) ...
Setting up cpp (4:7.3.0-3ubuntu2.1) ...
Setting up python3-keyring (10.6.0-1) ...
Setting up libpython3.6-dev:amd64 (3.6.7-1~18.04) ...
Setting up python3-pip (9.0.1-2.3~ubuntu1) ...
Setting up binutils (2.30-21ubuntu1~18.04) ...
Setting up python3-setuptools (39.0.1-2) ...
Setting up python3.6-dev (3.6.7-1~18.04) ...
Setting up dh-python (3.20180325ubuntu2) ...
Setting up libpython3-dev:amd64 (3.6.7-1~18.04) ...
Setting up gcc-7 (7.3.0-27ubuntu1~18.04) ...
Setting up g++-7 (7.3.0-27ubuntu1~18.04) ...
Setting up python3-dev (3.6.7-1~18.04) ...
Setting up gcc (4:7.3.0-3ubuntu2.1) ...
Setting up dpkg-dev (1.19.0.5ubuntu2.1) ...
Setting up g++ (4:7.3.0-3ubuntu2.1) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up build-essential (12.4ubuntu1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
```

### インストールされたか確認

```bash
$ which pip3
/usr/bin/pip3

$ pip3

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.
  search                      Search PyPI for packages.
  wheel                       Build wheels from your requirements.
  hash                        Compute hashes of package archives.
  completion                  A helper command used for command completion.
  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.
  --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 as trusted, even though it does not have valid or any HTTPS.
  --cert <path>               Path to alternate CA bundle.
  --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.
```

# おまけ。インストールされてるライブラリ観てみる
```bash:インストールされてるライブラリ確認
$ pip3 freeze
ansible==2.7.10
asn1crypto==0.24.0
attrs==17.4.0
Automat==0.6.0
bcrypt==3.1.6
blinker==1.4
certifi==2018.1.18
cffi==1.12.3
chardet==3.0.4
click==6.7
cloud-init==18.2
colorama==0.3.7
command-not-found==0.3
configobj==5.0.6
constantly==15.1.0
cryptography==2.6.1
distro-info==0.18
httplib2==0.9.2
hyperlink==17.3.1
idna==2.6
incremental==16.10.1
Jinja2==2.10.1
jsonpatch==1.16
jsonpointer==1.10
jsonschema==2.6.0
keyring==10.6.0
keyrings.alt==3.0
language-selector==0.1
MarkupSafe==1.1.1
oauthlib==2.0.6
PAM==0.4.2
paramiko==2.4.2
pyasn1==0.4.5
pyasn1-modules==0.2.1
pycparser==2.19
pycrypto==2.6.1
pygobject==3.26.1
PyJWT==1.5.3
PyNaCl==1.3.0
pyOpenSSL==17.5.0
pyserial==3.4
python-apt==1.6.2
python-debian==0.1.32
pyxdg==0.25
PyYAML==5.1
requests==2.18.4
requests-unixsocket==0.1.5
SecretStorage==2.3.1
service-identity==16.0.0
six==1.12.0
ssh-import-id==5.7
systemd-python==234
Twisted==17.9.0
ufw==0.35
unattended-upgrades==0.1
urllib3==1.22
zope.interface==4.3.2
```