Python Installation
Python is a scripting language that is unfortunately used as a systems language.
Windows
macOS
brew
Linux
Arch Linux
On Arch Linux systems, python points to the most recent version. Older versions are available on the AUR as python37, python36, python26, etc.
Major libraries are offered as packages and should be preferred over manual installation.
sudo pacman -Syyu python python-pip python-setuptools
Debian
On Debian systems, use python3 rather than python. This operating system supported (and used) both Python 2 and Python 3 for an extended period of time, leading to widespread use of shebang lines as the method of dispatching to the correct executable.
Debian vendors Python heavily. Namely, they patch out the ensurepip module to enforce apt package control.
sudo apt install python3 python3-virtualenv python3-venv python3-setuptools python3-pip
Ubuntu
Ubuntu inherits the problems of Debian. The deadsnakes PPA provides alternate versions of Python with versioned names.
sudo add-apt-repository ppa:deadsnakes/ppa sudo apt-get update sudo apt install python3.8
Configuration
The python interpretor looks for modules on $PATH, appending its own libraries. Additional appends can be set in $PYTHONPATH.
A startup script can be set with $PYTHONSTARTUP.