Is there a simple, one-liner yum
-like command to install Python 3.9 on Amazon Linux?
[root@ip-10-0-0-182 ~]# yum install python39 Loaded plugins: extras_suggestions, langpacks, priorities, update-motd No package python39 available. Error: Nothing to do
The top hit on Google is currently this article which tells you to download sources and build it yourself. I don't want that.
this is the only solution I found in the web which works. Strangely it is hard to find...
https://techviewleo.com/how-to-install-python-on-amazon-linux/
or you to install 3.8 on Amazon Linux 2, you need to have amazon-linux-extras repository installed.
$ which amazon-linux-extras
/usr/bin/amazon-linux-extras
If the command doesn’t return any output, then install the package that will configure the repository:sudo yum install -y amazon-linux-extras
Confirm if you can see Python 3.8 packages available on the repository.$ amazon-linux-extras | grep -i python
python3.8 available [ =stable ] As can be seen from the output python3.8 package is available for installation. Enable the repository before using it.
sudo amazon-linux-extras enable python3.8
Issue the commands shown below in the terminal to install Python 3.8 on Amazon Linux 2 server.sudo yum install python3.8