Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • DSA
  • Practice Problems
  • Python
  • C
  • C++
  • Java
  • Courses
  • Machine Learning
  • DevOps
  • Web Development
  • System Design
  • Aptitude
  • Projects
Open In App
Next Article:
How to Install Go on AWS EC2?
Next article icon

How to Install Python 2.8 on AWS EC2?

Last Updated : 31 Oct, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report


AWS or Amazon Web Services is one of the biggest cloud services providers with a variety of services such as on-demand computational services, databases, storage space, etc. EC2 or Elastic Compute Cloud is one of its services which acts as an on-demand computing service on the cloud platform. From a computational point of view, it includes various different computing services as well as a virtual environment.

Steps to Create a New AWS Instance

To create a free AWS account refer to Amazon Web Services (AWS) – Free Tier Account Set up.

Step 1: Visit the AWS website and search for EC2 from various different available options.

Step 2: On the EC2 page, click on the Launch Instance button to create a new instance. There are different instance types. For more information, refer to Amazon EC2 – Instance Types

Step 3: Give a suitable name for your instance.

Step 4: Select UBUNTU as the Amazon Machine Image.


file

Step 5: Go to the Key-pair section, and create a new key-pair set (if you don’t have one already). Put a suitable name for your key and download it on your local machine. This key would help to log in to our instance using an SSH client.

file

Step 6: Click on the launch instance button on the right-hand bottom side to launch the instance.

Step 7: It will take a few seconds for the instance to start completely and go into a running state.


file

Connect to the Instance Using SSH Client

Step 1: Wait till the instance is up and running and after that click on Connect button on the top right-hand side of the page.

Step 2: Start the SSH client on your local system. (PuTTy for Windows, Terminal for Linux/MacOS).

Step 3: Go to the folder where you stored your private key file onto the terminal using the following command:

cd <path-to-your-folder>

Step 4: To give execute permission to the secret key file, execute the following command:

chmod 400 <privateKeyFile.pem>

Step 5: Connect to your instance using its public DNS. Copy the command given in the Example section and execute it on your terminal.

file

Step 6: After running this command, you will be asked “Are you sure you want to continue connecting (yes/no/[fingerprint])?”. Put “yes” and click Enter.

Step 7: You are now successfully connected to your instance on AWS from your local machine using an SSH client.

Install Python 2.7 on AWS Instance

Step 1: Before doing anything, let's update the package list on our local system using the following command.

sudo apt update

Step 2: Follow the give command to install all dependencies which are important to follow basic linux operations.

sudo apt-get install build-essential


file

Step 3: The AWs EC2 does not offer installation capabilities of specific python versions. It can install python2.7 for a default version, but, to install a specific version like python2.7.8, we need to do the installation manually using the executable file. Use the given command to install such a file for python2.7.8 version.

wget https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz


file

Step 4: Check that the following file is a tar.gz file. So, use the following command to unzip this folder.

tar -xzyf Python-2.7.8.tgz


file

Step 5: Use the following command to check if the folder has been properly unzipped.


file

Step 6: After going inside the folder, use the following commands to finish the installation process for python2.7.8 version.

./configure
make
sudo make install

file

file

file

Step 7: The status of the installed python versin can be checked using the following command.

 python2.7 --version

file


Next Article
How to Install Go on AWS EC2?

K

kushal_lahoti
Improve
Article Tags :
  • How To
  • Geeks Premier League
  • Geeks Premier League 2023

Similar Reads

  • How to Install Python3 on AWS EC2?
    AWS or Amazon web services is a cloud service platform that provides on-demand computational services, databases, storage space, and many more services. EC2 or Elastic Compute Cloud is a scalable computing service launched on the AWS cloud platform. In simpler words, EC2 is nothing but a virtual com
    3 min read
  • How to Install PHP on AWS EC2?
    AWS or Amazon web services is a cloud service platform that provides on-demand computational services, databases, storage space, and many more services. EC2 or Elastic Compute Cloud is a scalable computing service launched on the AWS cloud platform. In simpler words, EC2 is nothing but a virtual com
    2 min read
  • How to Install R on AWS EC2?
    R is widely used as a different programming language. There are several programming languages are present for different purposes. The C programming language is used to get basic knowledge in the programming field. Java programming language is used to get some deep knowledge of programming & its
    7 min read
  • How to Install Go on AWS EC2?
    EC2 or Elastic Compute Cloud is a scalable computing service launched on the AWS cloud platform. In simpler words, EC2 is nothing but a virtual computer on which we can perform all our tasks and we have the authority to configure, launch or even dissipate this virtual computer.Go is an open-source,
    2 min read
  • How to Install MySQL on AWS EC2?
    AWS or Amazon web services is a cloud service platform that provides on-demand computational services, databases, storage space, and many more services. EC2 or Elastic Compute Cloud is a scalable computing service launched on the AWS cloud platform. In simpler words, EC2 is nothing but a virtual com
    2 min read
  • How to Install a Python Module?
    A module is simply a file containing Python code. Functions, groups, and variables can all be described in a module. Runnable code can also be used in a module. What is a Python Module?A module can be imported by multiple programs for their application, hence a single code can be used by multiple pr
    4 min read
  • How to Install AWS CLI on Ubuntu?
    The AWS Command Line Interface (CLI) is a unified tool to manage your AWS services. With just one tool to download and configure, you can control multiple AWS services from the command line and automate them through scripts. Here are the step-by-step instructions to install AWS CLI on UbuntuStep 1:
    3 min read
  • How To Install Docker On AWS EC2 ?
    You can use the following instructions to install Docker on an AWS EC2 instance. Note that depending on the Linux distribution your EC2 instance is running, there may be differences in certain commands or processes. What is Docker?Docker is an OS-level virtualization that provides tools for building
    3 min read
  • How to Install MongoDB on AWS EC2 Instance?
    AWS or Amazon web services is a cloud service platform that provides on-demand computational services, databases, storage space, and many more services. EC2 or Elastic Compute Cloud is a scalable computing service launched on the AWS cloud platform. In simpler words, EC2 is nothing but a virtual com
    2 min read
  • How To Install Git on AWS?
    Git is a well-known distributed version control system. There are many other distributed version control systems are present, like Mercurial, Bazar, etc but among them, Git is widely used for some of its unique features. Basically Version Control systems are two types. One is Centralised & anoth
    2 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences