안녕하세요?
AWS EC2에 기본적으로 Python3.6 또는 그 이하 버전이 설치되어있는 경우,
사용하다보면 Python3.7 이상의 버전이 필요할 때가 있습니다.
그럴 때 이 포스트에 나와있는 프로세스대로 진행하면 Python 3.7을 EC2에 설치할 수 있습니다.
Python 3.7 설치
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.7
*여기서 셋째 줄의 deadsnakes는 여러 버전의 Python 을 설치 가능하게 해줍니다.
설치 완료되면 아래의 명령어로 버전 확인이 가능합니다.
python3.7 -V
pip 설치
pip 설치는 기존 Python버전이 3 이상이면 skip 해주셔도 됩니다,
sudo apt-get install python3-pip
sudo apt-get install python3.7-distutils
Python3.7 실행
python3.7 -m pip install [package_name]
ex) tensorflow 패키기를 설치하는 경우> python3.7 -m pip install tensorflow
Reference