본문 바로가기
AWS

[Cloud9] Amazon Linux 2 에서 Python3.10 설치하기

by bryan.oh 2023. 3. 25.
반응형

Amazon Linux 2 에서 Python3.10 설치하기

아래 명령어 실행

sudo yum update -y
sudo yum groupinstall "Development Tools" -y
sudo yum erase openssl-devel -y
sudo yum install openssl11 openssl11-devel  libffi-devel bzip2-devel wget -y

python 설치

# 권한 없다면 sudo 로
wget https://www.python.org/ftp/python/3.10.6/Python-3.10.6.tgz
tar -xf Python-3.10.6.tgz
cd Python-3.10.6/

./configure --enable-optimizations
sudo make altinstall

python3.10 -m pip install --upgrade pip
$ python3 -V
# Python 3.7.16
# 3.10.6 이 나와야 하므로

python path 설정

which python3.10
# /usr/local/bin/python3.10

sudo update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.10 1

sudo update-alternatives --config python3

python3 -V
# Python 3.10.6

 

 

728x90
반응형

댓글