Differences between revisions 1 and 5 (spanning 4 versions)
Revision 1 as of 2019-12-07 13:06:48
Size: 574
Comment: Initial commit
Revision 5 as of 2021-11-20 22:04:58
Size: 1596
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= System Installation = = Python Installation =
Line 3: Line 3:
== 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 6: Line 33:
sudo pacman -Syyu python pip sudo pacman -Syyu python python-pip python-setuptools
Line 11: Line 38:
== 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 17: Line 48:
Debian patches out the `ensurepip` module to enforce `apt` package control.
Line 20: Line 50:
=== Ubuntu ===
Line 21: Line 52:
== Ubuntu ==

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 28: Line 57:
sudo apt install python#.# sudo apt install python3.8
Line 30: Line 59:

----
Line 33: Line 64:
= 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.


CategoryRicottone

Python/Installation (last edited 2021-11-20 22:05:16 by DominicRicottone)