Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does AWS EC2 Only offer python 3.7.2 installation with yum?

I've started an EC2 instance and have to use yum to install python. In order to see all available versions of Python 3 I ran this command: sudo yum list | grep python3 and I get back this list:

python3.x86_64                         3.7.2-4.amzn2.0.1              amzn2-core
python3-Cython.x86_64                  0.27.3-2.amzn2.0.2             amzn2-core
python3-debug.x86_64                   3.7.2-4.amzn2.0.1              amzn2-core
python3-devel.x86_64                   3.7.2-4.amzn2.0.1              amzn2-core
python3-libs.i686                      3.7.2-4.amzn2.0.1              amzn2-core
python3-libs.x86_64                    3.7.2-4.amzn2.0.1              amzn2-core
python3-lit.noarch                     0.7.1-1.amzn2.0.1              amzn2-core
python3-pip.noarch                     9.0.3-1.amzn2.0.1              amzn2-core
python3-rpm-macros.noarch              3-23.amzn2                     amzn2-core
python3-setuptools.noarch              38.4.0-3.amzn2.0.6             amzn2-core
python3-test.x86_64                    3.7.2-4.amzn2.0.1              amzn2-core
python3-tkinter.x86_64                 3.7.2-4.amzn2.0.1              amzn2-core
python3-tools.x86_64                   3.7.2-4.amzn2.0.1              amzn2-core
python3-wheel.noarch                   0.30.0a0-9.amzn2.0.3           amzn2-core

It looks like there are no distributions of Python 3.6 in yum on ec2 instances. Does anyone know why this is? I know you can use wget, but I don't understand why Amazon would make you jump through so many more hoops to get 3.6.

like image 494
matt_js Avatar asked Nov 06 '22 18:11

matt_js


1 Answers

I think yum only shows the latest version by default. I don't have a yum box handy to test this on, but I found this resource. It looks like you can show alternate versions with:

yum list python3 --showduplicates

You can then install a specific version with (assuming the version info is just "3.6"):

sudo yum install python3-3.6

more generally sudo yum install <package_name>-<version>.

like image 189
Engineero Avatar answered Nov 15 '22 12:11

Engineero