3 min read
01 Jan, 2025
Python
Python is one of the most popular programming languages in the world, known for its simplicity and versatility. Whether you are a beginner or an experienced developer, we will walk you through the process of installing Python on both Ubuntu and Windows.
Ubuntu comes with Python pre-installed. However, it might not be the latest version. Here’s how you can check your Python version and install or update Python on your Ubuntu system.
Open a terminal and type:
python3 --version
python3 --version If Python is installed, you will see the version number. For example:
Python 3.9.7
If Python is not installed or you need to update it, follow the next steps.
Before installing Python, update your system’s package list:
sudo apt update
To install the latest version of Python, run:
sudo apt install python3
pip is a tool for installing Python packages. You can install pip with:
sudo apt install python3-pip
Check the Python and pip installations by running:
python3 --version
pip3 --version
Now Python and pip are installed and ready to use on your Ubuntu system.
Installing Python on Windows is straightforward. Follow these steps to get started:
Once the installation is complete, verify it by opening Command Prompt and typing:
python --version
You should see the installed version of Python.
Most Python installers for Windows include pip. To check if pip is installed, type:
pip --version
If pip is not installed, you can install it by downloading the get-pip.py script from the official Python website and running:
python get-pip.py
If you didn’t check “Add Python to PATH” during installation, you can set up the PATH manually:
Test Python and pip by running:
python --version
pip --version
You have now installed Python on both Ubuntu and Windows! Whether you're using Python for web development, data analysis, or automation, having the latest version ensures compatibility with the newest libraries and features. Happy coding!