|
Size: 840
Comment:
|
Size: 1634
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 1: | Line 1: |
| = System Installation = | ## page was renamed from PythonSetup = Python Installation = |
| Line 3: | Line 4: |
| == Arch == | '''Python''' is a scripting language that is unfortunately used as a systems language. <<TableOfContents>> ---- == 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 [[Python/Pip|manual installation]]. |
| Line 7: | Line 35: |
| # or, sudo pacman -Syyu python2 python2-pip python2-setuptools | |
| Line 9: | Line 36: |
Older versions are available on the AUR as `python37`, `python36`, `python26`, etc. |
|
| Line 14: | Line 39: |
| == Debian == | === 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. |
| Line 18: | Line 47: |
| # or, sudo apt install python python-virtualenv python-venv python-setuptools python-pip | |
| Line 20: | Line 48: |
Debian patches out the `ensurepip` module to enforce `apt` package control. |
|
| Line 25: | Line 51: |
| == Ubuntu == | === Ubuntu === |
| Line 27: | Line 53: |
| A default version of Python should work out-of-the-box. For alternate versions, use the deadsnakes PPA: | '''Ubuntu''' inherits the problems of Debian. The deadsnakes PPA provides alternate versions of Python with versioned names. |
| Line 32: | Line 58: |
| sudo apt install python#.# | sudo apt install python3.8 |
| Line 34: | Line 60: |
---- |
|
| Line 37: | Line 65: |
| = Environment Setup = | == 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`. |
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.
