Codeground AI
EditorWorkspacesInterviews Meet New Daily Challenges
Data & format
  • JSON DiffCompare two JSON blobs side by side
  • Diff & PatchGenerate unified patches from text/code
  • JSON FormatterPretty-print and validate JSON
  • SQL FormatterFormat SQL and explain with AI
  • JSON ↔ CSVConvert tabular data both ways
  • Base64 CodecEncode and decode Base64
  • Log ParserPretty-print logs and highlight severity
Security & web
  • JWT DebuggerDecode and verify JSON Web Tokens
  • ENV LinterLint .env files and redact values
  • Password GeneratorStrong, configurable passwords
  • UUID GeneratorGenerate UUID v1/v4 in bulk
  • Regex TesterTest patterns in real time
Generators & utilities
  • Epoch ConverterConvert between Unix and dates
  • Meeting PlannerMatrix of slots across timezones
  • Date MathAdd duration with timezone awareness
  • Cron BuilderValidate cron and preview next runs
  • QR GeneratorMake scannable QR codes
  • Color PickerPick & convert colors
  • Lucky Draw WheelSpin-the-wheel utility
Network & creative
  • Speed TestMeasure network throughput
  • Diagram StudioFlowcharts & architecture diagrams
  • Canvas DrawingA scratchpad for sketches
  • Turtle GameCoding game for kids
See everything Codeground AI offers
Reads
Sign In Sign Up
EditorWorkspacesInterviewsMeetDaily ChallengesReads
Tools
JSON DiffDiff & PatchJSON FormatterSQL FormatterJSON ↔ CSVBase64 CodecLog ParserJWT DebuggerENV LinterPassword GeneratorUUID GeneratorRegex TesterEpoch ConverterMeeting PlannerDate MathCron BuilderQR GeneratorColor PickerLucky Draw WheelSpeed TestDiagram StudioCanvas DrawingTurtle Game

Sign InSign Up

Notifications 0

Install Python 3 on Ubuntu 18.04 and 20.04 System

Steve Joshua - March 21, 2025


Introduction


Python is an interpreted high-level general-purpose programming language. It's design philosophy emphasizes code readability with it's use of significant indentation. It's language constructs as well as it's object oriented approach aim to help programmers write clear, logical code for small and large-scale projects.


Prerequisites


  • A system running Ubuntu 18.04 or Ubuntu 20.04
  • A user account with sudo privileges
  • Access to a terminal



Option 1: Using apt


Most of the times the Ubuntu version 18.04 and 20.04 come with Python pre-installed. You can use the below command and run it in terminal to check if Python is installed already on your system.


python --version


If version comes out to be lower than 3 or if python is not installed, please proceed to next steps.



Step 1: Update repository list


Run this command to update the repository list.


sudo apt update


Step 2: Install dependencies


Run this command to install packages that are required for Python to work properly.


sudo apt install software-properties-common


Step 3: Install Deadsnakes PPA


Deadsnakes is a PPA with newer releases than the default Ubuntu repositories. Add the PPA by entering the following:


sudo add-apt-repository ppa:deadsnakes/ppa


Once this finishes, please refresh the apt packages again by running the command.


sudo apt update 


Step 3: Install Python


Now we are good to go and install python. You can install python by running this below mentioned command.


sudo apt install python3.8


Once this is installed, we can confirm by checking the python version again using::


python --version


This must have an output as `Python 3.8.2`.



Option 2: Installing Python from Source



Step 1: Update the apt package repository


sudo apt update


Step 2: Next install the dependency packages required for Python to build


sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev wget libbz2-dev


Step 3: Download the latest Python package, using the wget command.


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


Step 4: Once the zip is downloaded, we would need to unzip it. We can do it using below code.


tar -xf Python-3.7.4.tgz


Step 5: Check and install required dependency for Python to run


cd Python-3.7.4
./configure --enable-optimizations


The --enabled-optimizations flag will optimize the Python binary by running multiple tests, this might make the build process slower.


Step 6: Start the Python build process


make -j 8


Step 7: Install Python Binaries


sudo make altinstall



Step 8: Verify the installation


python3.7 --version




Conclusions


Now we have Python 3 installed on your Ubuntu system.


Codeground AI

The browser is the only IDE you need. Cloud workspaces, 15+ language runtimes, secure interview tooling and a polished developer toolbox — all in one tab.

Languages

  • Node.js
  • Python
  • Java
  • C++
  • Go
  • Rust
  • TypeScript
  • Web (HTML/CSS/JS)
  • Shell / Bash

Databases

  • MongoDB
  • PostgreSQL
  • MySQL
  • Redis
  • ClickHouse

Tools

  • JSON Diff
  • Diff & Patch
  • JSON Formatter
  • JSON ↔ CSV
  • JWT Debugger
  • Base64 Codec
  • Regex Tester
  • Epoch Converter
  • Cron Builder
  • Meeting Planner
  • SQL Formatter
  • ENV Linter
  • Date Math
  • Log Parser
  • QR Generator
  • UUID Generator
  • Color Picker
  • Password Generator
  • Speed Test
  • Diagram Studio
  • Canvas Drawing
  • Lucky Draw Wheel

Platform

  • Daily Challenges
  • Interviews
  • Reads
  • Turtle (Kids)

Company

  • About Us
  • Privacy Policy
  • Sitemap
  • Contact

© 2026 Codeground AI. Built for developers who want to ship.

About·Privacy·Sitemap·[email protected]