这个问题专门针对安装python 3.6 版。没有任何其他版本。
我正在使用 aws 的 amazonlinux docker 镜像并尝试在其上安装 python3.6。不到一个月前,它只使用 yum install python3.x86_64
就成功了。 ,但现在似乎所有的python3版本都在使用python3.7,如下图:
bash-4.2# sudo yum list | grep python3
python3.i686 3.7.4-1.amzn2.0.3 amzn2-core
python3.x86_64 3.7.4-1.amzn2.0.3 amzn2-core
python3-Cython.x86_64 0.27.3-2.amzn2.0.2 amzn2-core
python3-debug.x86_64 3.7.4-1.amzn2.0.3 amzn2-core
python3-devel.x86_64 3.7.4-1.amzn2.0.3 amzn2-core
python3-libs.i686 3.7.4-1.amzn2.0.3 amzn2-core
python3-libs.x86_64 3.7.4-1.amzn2.0.3 amzn2-core
python3-lit.noarch 0.7.1-1.amzn2.0.1 amzn2-core
python3-openmpi.x86_64 4.0.1-11.amzn2.0.1 amzn2-core
python3-pip.noarch 9.0.3-1.amzn2.0.1 amzn2-core
python3-rpm.x86_64 4.11.3-40.amzn2.0.3 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.4-1.amzn2.0.3 amzn2-core
python3-tkinter.x86_64 3.7.4-1.amzn2.0.3 amzn2-core
python3-tools.x86_64 3.7.4-1.amzn2.0.3 amzn2-core
python3-wheel.noarch 0.30.0a0-9.amzn2.0.3 amzn2-core
最佳答案
请启用 ius 存储库并安装 python36u
https://www.certdepot.net/rhel7-how-to-install-the-ius-community-repository/
yum install python36u
关于python - 如何在 aws ec2 实例上安装 python3.6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59582741/