Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/princemardoch/install-pip-simply

Installing pip from the command line - a step-by-step guide
https://github.com/princemardoch/install-pip-simply

pip pip-install python3 shell

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# 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:
```sh
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:
```sh
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:
```sh
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`:
```sh
sudo python3 get-pip.py
```
Make sure to keep pip up to date by regularly using the command:
```sh
pip install --upgrade pip
```