I want to use Python 3.9 with CloudShell.

0

I would like to use Python 3.9 with CloudShell.
Python 3.9 is required in pyenv because Python 3.9 is used in the Lambda runtime.
I tried to use Python 3.9.17 with pyenv by running the following command, but the command gets stuck at the "pyenv global 3.9.17" stage.
Is it possible to use Python 3.9 without pyenv in CloudShell?

sudo yum install gcc
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.bash_profile
source .bash_profile
pyenv install 3.9.17
pyenv global 3.9.17
profile picture
전문가
질문됨 10달 전599회 조회
2개 답변
1
수락된 답변

The sam build now succeeds by installing Python 3.9 from source using the following method.

!#bin/bash

sudo yum install gcc openssl-devel bzip2-devel libffi-devel -y
wget https://www.python.org/ftp/python/3.9.17/Python-3.9.17.tgz
tar xzf Python-3.9.17.tgz
cd Python-3.9.17
./configure --enable-optimizations --prefix=$HOME/.local
sudo make altinstall
profile picture
전문가
답변함 10달 전
profile picture
전문가
검토됨 10달 전
0

!#bin/bash

sudo yum install gcc openssl-devel bzip2-devel libffi-devel -y wget https://www.python.org/ftp/python/3.9.17/Python-3.9.17.tgz tar xzf Python-3.9.17.tgz cd Python-3.9.17 ./configure --enable-optimizations --prefix=$HOME/.local sudo make altinstall

답변함 8달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠