Skip to content

Instantly share code, notes, and snippets.

@everdimension
Created August 14, 2023 07:56
Show Gist options
  • Save everdimension/3aff90e1f75f7a3ae402dbe3c9128da0 to your computer and use it in GitHub Desktop.
Save everdimension/3aff90e1f75f7a3ae402dbe3c9128da0 to your computer and use it in GitHub Desktop.
python3 on ubuntu 20

Python setup flow

This should setup python environment on Ubuntu 20 (Ubuntu 20.04.6 LTS)

Install pip

Instructions: https://pip.pypa.io/en/stable/installation/#get-pip-py

  1. Download get-pip.py file:
    wget https://bootstrap.pypa.io/get-pip.py
  2. Install distutils:
    apt-get install python3-distutils
  3. Install pip:
    python3 get-pip.py # path to downloaded file

Setup venv

  1. Create project folder
    mkdir your-project
    cd your-project
  2. Install venv module:
    apt install python3.8-venv
  3. Create virtual environment:
    python3 -m venv ./venv
  4. Activate virtual environment
    source ./venv/bin/activate

Install dependencies for the project

pip install flask
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment