Blog 2020/5/1
<- previous | index | next ->
Reminder to self about how to install and invoke Python 2 vs. 3 on the various platforms I use.
See also https://xkcd.com/1987
Platform | python / pip |
python2 / pip2 |
python3 / pip3 |
---|---|---|---|
MacOS (Mojave) / Homebrew | 2.x | 2.x | 3.x |
Debian (Buster) | 2.x | 2.x | 3.x |
Windows (7) / MSYS2 | 3.x | 2.x | 3.x |
Note: this assumes /usr/local/bin
precedes /usr/bin
in your $PATH
.
brew install python
Invoke as python3
and pip3
.
This is a bit of a pain.
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/86a44a0a552c673a05f11018459c9f5faae3becc/Formula/python@2.rb
Invoke as python
and pip
(or python2
and pip2
).
apt-get install python3 python3-pip
Invoke as python3
and pip3
.
apt-get install python python-pip
Invoke as python
and pip
(or python2
and pip2
).
pacman -S python python-pip
Invoke as python
and pip
(or python3
and pip3
).
pacman -S python2 python2-pip
Invoke as python2
and pip2
.