Writing productivity
productivity 5 min read 4 January 2022

Pop!_OS Development Environment Setup

A repeatable bash setup script for a Pop!_OS data science workstation - system tools, Chrome, Docker, SQLite, TA-Lib for quantitative finance, Python environment, and SSH for GitHub.

Repeatable Machine Setup

A fresh machine should be reproducible in under an hour. This script covers a data science workstation on Pop!_OS 22.04. System tools, development dependencies, Docker, and the Python environment.

Core System Setup

cd ~
# Update package index
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install -y python3-pip htop python-is-python3 python3-venv python3-opencv

# Google Chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install -y ./google-chrome-stable_current_amd64.deb
rm ./google-chrome-stable_current_amd64.deb

# Sublime Text
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo apt-get install -y apt-transport-https
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update && sudo apt-get install -y sublime-text

# Utilities
sudo apt-get install -y vlc sqlite3 sqlitebrowser

Docker

sudo apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update && sudo apt-get install -y docker-ce docker-ce-cli containerd.io

Git Config

git config --global user.email "your@email.com"
git config --global user.name "Your Name"

TA-Lib (for quantitative finance / Zipline)

TA-Lib requires a native build from source. There’s no apt package:

# Build dependencies
sudo apt-get install -y libatlas-base-dev python-dev gfortran pkg-config libfreetype6-dev hdf5-tools

# Download, build, and install TA-Lib
wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
tar -xzf ta-lib-0.4.0-src.tar.gz && rm ta-lib-0.4.0-src.tar.gz
cd ta-lib/
sudo ./configure && sudo make && sudo make install
echo 'export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH' >> ~/.bashrc

Python Virtual Environment

PORTFOLIO_DIR="/path/to/your/project"
mkdir -p $PORTFOLIO_DIR/python_environments
cd $PORTFOLIO_DIR/python_environments
python -m venv portfolio_env
echo "source $PORTFOLIO_DIR/python_environments/portfolio_env/bin/activate" >> ~/.bashrc
echo 'export PATH="/home/$USER/.local/bin:$PATH"' >> ~/.bashrc
source $PORTFOLIO_DIR/python_environments/portfolio_env/bin/activate
pip3 install -r $PORTFOLIO_DIR/requirements.txt
source ~/.bashrc

CMake (for C++ dependencies)

Some Python packages with native extensions (e.g., certain CV libraries) need a recent CMake:

sudo apt-get install -y build-essential libssl-dev
wget https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0.tar.gz
tar -zxvf cmake-3.20.0.tar.gz && rm cmake-3.20.0.tar.gz
cd cmake-3.20.0
./bootstrap && make && sudo make install

SSH for GitHub

ssh-keygen -t ed25519 -C "your@email.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub  # Copy this to GitHub → Settings → SSH Keys

Other Useful Tools

Pantheon Files (elementary OS file manager, works on Pop!_OS):

sudo add-apt-repository ppa:elementary-os/stable
sudo apt-get update && sudo apt-get install pantheon-files

GitHub Desktop for Linux: available from shiftkey/desktop. The community-maintained fork that builds against the latest Electron.

Auto-hide top bar: on Pop!_OS with GNOME, the top panel can be set to auto-hide via this guide. Useful on laptops where vertical space is at a premium.

linux pop-os setup tools python docker
← All articles

Have a problem worth solving?

Whether you need a quantitative researcher, a Machine Learning systems builder, or a technical advisor, I take a small number of consulting engagements at a time.

Book a call →