LoginSignup
1
0

More than 5 years have passed since last update.

AWS LinuxでPython3やるならAmazon Linuxのイメージがお手軽だった件

Posted at

AMI ID: amzn-ami-hvm-2018.03.0.20181129-x86_64-gp2 (ami-0cd3dfa4e37921605)

2xしか入ってなさげ

$ which python
/usr/bin/python
$ find / -name python 2> /dev/null
/usr/share/gcc-7/python
/usr/bin/python
/var/lib/alternatives/python
/etc/alternatives/python
$ ll /usr/bin/python
lrwxrwxrwx 1 root root 24 Nov 16 23:06 /usr/bin/python -> /etc/alternatives/python
$ ll /usr/bin/python*
lrwxrwxrwx 1 root root   24 Nov 16 23:06 /usr/bin/python -> /etc/alternatives/python
-rwxr-xr-x 1 root root 5120 May  2  2018 /usr/bin/python27
-rwxr-xr-x 1 root root 5120 May  2  2018 /usr/bin/python2.7
-rwxr-xr-x 1 root root 1846 May  2  2018 /usr/bin/python2.7-config
lrwxrwxrwx 1 root root   31 Nov 16 23:06 /usr/bin/python-config -> /etc/alternatives/python-config
$ sudo yum install python36 python36-virtualenv python36-pip
$ which python
/usr/bin/python
$ ll /usr/bin/python*
lrwxrwxrwx 1 root root   24 Apr 27 08:18 /usr/bin/python -> /etc/alternatives/python
-rwxr-xr-x 1 root root 5120 May  2  2018 /usr/bin/python27
-rwxr-xr-x 1 root root 5120 May  2  2018 /usr/bin/python2.7
-rwxr-xr-x 1 root root 1846 May  2  2018 /usr/bin/python2.7-config
lrwxrwxrwx 1 root root   25 Apr 27 08:18 /usr/bin/python3 -> /etc/alternatives/python3
-rwxr-xr-x 3 root root 6872 Mar 18 18:59 /usr/bin/python36
-rwxr-xr-x 3 root root 6872 Mar 18 18:59 /usr/bin/python3.6
lrwxrwxrwx 1 root root   17 Apr 27 08:18 /usr/bin/python3.6-config -> python3.6m-config
-rwxr-xr-x 3 root root 6872 Mar 18 18:59 /usr/bin/python3.6m
-rwxr-xr-x 1 root root  173 Mar 18 18:59 /usr/bin/python3.6m-config
-rwxr-xr-x 1 root root 3373 Mar 18 18:39 /usr/bin/python3.6m-x86_64-config
lrwxrwxrwx 1 root root   32 Apr 27 08:18 /usr/bin/python3-config -> /etc/alternatives/python3-config
lrwxrwxrwx 1 root root   31 Apr 27 08:18 /usr/bin/python-config -> /etc/alternatives/python-config

pip確認

$ ll /usr/bin/pip*
lrwxrwxrwx 1 root root  21 Apr 27 08:18 /usr/bin/pip -> /etc/alternatives/pip
-rwxr-xr-x 1 root root 370 Apr 25  2018 /usr/bin/pip-2.7
-rwxr-xr-x 1 root root 370 Apr 25  2018 /usr/bin/pip-3.6

リンクを張った

$ ln -s /usr/bin/pip-3.6 /usr/bin/pip3

こちらにお世話になりました(リスペクト)

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0