2 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
2
Why not try installing Python3.12 using pyenv as shown below?
FROM amazonlinux:2023
RUN dnf install -y git tar gcc \
zlib-devel bzip2-devel readline-devel \
sqlite sqlite-devel openssl-devel \
tk-devel libffi-devel xz-devel
RUN curl https://pyenv.run | bash && \
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc && \
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc && \
echo 'eval "$(pyenv init -)"' >> ~/.bashrc && \
source ~/.bashrc && \
pyenv install 3.12.4 && \
pyenv global 3.12.4
0
Looks like python3.11 is the latest available in the repos.
dnf list | grep python3
Contenus pertinents
- demandé il y a 3 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 5 ans
- AWS OFFICIELA mis à jour il y a 5 ans
- AWS OFFICIELA mis à jour il y a 5 mois
By the way, this method takes about 6 to 7 minutes to build. Once the build is complete, you can start the container from the image and check the Python version.