Skip to content

Installing pip from the command line - a step-by-step guide

Notifications You must be signed in to change notification settings

princemardoch/Install-pip-simply

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 

Repository files navigation

Installing pip

This guide explains how to install pip, the package manager for Python, using the curl method.

Requirements

  • Python 3 installed on your system
  • Internet access
  • Terminal or command line

Installation Steps

  1. Download the pip installation script:

    curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

    This command downloads the get-pip.py script from the official PyPA (Python Packaging Authority) website and saves it in your current directory.

  2. Run the script with Python:

    python3 get-pip.py

    This command runs the downloaded script, which will install pip on your system.

Detailed Explanation

Step 1: Downloading the Script

We use the curl command to download files from the internet. In this case:

  • https://bootstrap.pypa.io/get-pip.py is the URL of the pip installation script.
  • -o get-pip.py tells curl to save the downloaded file as get-pip.py in the current directory.

Step 2: Running the Script

python3 get-pip.py starts the Python 3 interpreter and runs the get-pip.py script. This script:

  1. Checks your Python environment
  2. Downloads the latest version of pip
  3. Installs pip on your system

Checking the Installation

After installation, you can check if pip is correctly installed by running:

pip --version

This should display the version of pip installed on your system.

Notes

If you encounter permission errors during installation, you may need to run the command with sudo:

sudo python3 get-pip.py

Make sure to keep pip up to date by regularly using the command:

pip install --upgrade pip

About

Installing pip from the command line - a step-by-step guide

Topics

Resources

Stars

Watchers

Forks