0
0

EC2 amazon linux にPythonを入れてみよう 入門

Last updated at Posted at 2024-09-15

AWS EC2 インスタンスに Python をインストールする方法について説明します。以下の手順に従ってください。

Amazon Linux 2 の場合

  1. パッケージリストの更新:

    sudo yum update -y
    
  2. Python 3 のインストール:

    sudo yum install python3 -y
    

Ubuntu の場合

  1. パッケージリストの更新:

    sudo apt update
    
  2. Python 3 のインストール:

    sudo apt install python3 -y
    
  3. pip のインストール:

    sudo apt install python3-pip -y
    

Python と pip のバージョン確認

インストールが完了したら、以下のコマンドでバージョンを確認できます。

python3 --version
pip3 --version

サンプル画像
image.png

これで、EC2 インスタンスに Python と pip がインストールされ、使用できるようになります

Source: Conversation with Copilot, 9/15/2024
(1) Easily install Python 3 and Pip on an EC2 Instance. https://towardsthecloud.com/amazon-ec2-install-python-pip.
(2) 【AWS】EC2にPython3の環境を構築する方法ご紹介。. https://tomoblog.net/programing/aws/ec2-python3/.
(3) 【2020年版】AWSのEC2にPython3をインストールする方法 #Python - Qiita. https://qiita.com/kenta1984/items/2403ad9cb240522f6d1e.
(4) 【AWS】AWSのEC2でPythonのFlaskサーバーを構築する方法。. https://tomoblog.net/programing/aws/ec2-python-flask/.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0