If you check the Python version now you’ll notice that Python 3.6 is the default version python -version To access Python 3.6 you need to launch a new shell instance using the Software Collection scl tool: scl enable rh-python36 bash Now that we have SCL repository, we can install the python3 sudo yum install rh-python36 SCL is a community project that allows you to build, install, and use multiple versions of software on the same system, without affecting system default packages. You can find the entire details at this link.įirst, we need to enable SCL. Other things it can install (versions as of 18 Jan 18): ~]$ amazon-linux-extras listġ4 lamp-mariadb10.2-php7.2 disabled Īdding to all the answers already available for this question, I would like to add the steps I followed to install Python3 on AWS EC2 instance running CentOS 7. If you want to set up isolated virtual environments with it using yum install'd virtualenv tools don't seem to reliably work.Ĭalling the venv module/tool is less finicky, and you could double check it's what you want/expect with python3 -version beforehand. In Amazon Linux 2, there isn't a python3 in the default yum repos, instead there's the Amazon Extras Library. Note: This may be obsolete for current versions of Amazon Linux 2 since late 2018 (see comments), you can now directly install it via yum install python3.
0 Comments
Leave a Reply. |