Skip to main content
Second iteration. Fixed the weird syntax highlighting (as a result, the diff looks more extensive than it really is - use view "Side-by-side Markdown" to compare).
Source Link
Peter Mortensen
  • 31.1k
  • 22
  • 111
  • 134

From here Installing Python Modules:

Here is how to install packages for various versions that are installed at the same time on Linux, Mac, and POSIX:

python2   -m pip install SomePackage  # Default Python 2
python2.7 -m pip install SomePackage  # Specifically Python 2.7
python3   -m pip install SomePackage  # Default Python 3
python3.4 -m pip install SomePackage  # Specifically Python 3.4
python3.5 -m pip install SomePackage  # Specifically Python 3.5
python3.6 -m pip install SomePackage  # Specifically Python 3.6
python2   -m pip install SomePackage  # Default Python 2
python2.7 -m pip install SomePackage  # Specifically Python 2.7
python3   -m pip install SomePackage  # Default Python 3
python3.4 -m pip install SomePackage  # Specifically Python 3.4
python3.5 -m pip install SomePackage  # Specifically Python 3.5
python3.6 -m pip install SomePackage  # Specifically Python 3.6

On Windows, use the py Python launcher in combination with the -m switch:

py -2   -m pip install SomePackage  # Default Python 2
py -2.7 -m pip install SomePackage  # Specifically Python 2.7
py -3   -m pip install SomePackage  # Default Python 3
py -3.4 -m pip install SomePackage  # Specifically Python 3.4
py -2   -m pip install SomePackage  # Default Python 2
py -2.7 -m pip install SomePackage  # Specifically Python 2.7
py -3   -m pip install SomePackage  # Default Python 3
py -3.4 -m pip install SomePackage  # Specifically Python 3.4

From here Installing Python Modules:

Here is how to install packages for various versions that are installed at the same time on Linux, Mac, and POSIX:

python2   -m pip install SomePackage  # Default Python 2
python2.7 -m pip install SomePackage  # Specifically Python 2.7
python3   -m pip install SomePackage  # Default Python 3
python3.4 -m pip install SomePackage  # Specifically Python 3.4
python3.5 -m pip install SomePackage  # Specifically Python 3.5
python3.6 -m pip install SomePackage  # Specifically Python 3.6

On Windows, use the py Python launcher in combination with the -m switch:

py -2   -m pip install SomePackage  # Default Python 2
py -2.7 -m pip install SomePackage  # Specifically Python 2.7
py -3   -m pip install SomePackage  # Default Python 3
py -3.4 -m pip install SomePackage  # Specifically Python 3.4

From here Installing Python Modules:

Here is how to install packages for various versions that are installed at the same time on Linux, Mac, and POSIX:

python2   -m pip install SomePackage  # Default Python 2
python2.7 -m pip install SomePackage  # Specifically Python 2.7
python3   -m pip install SomePackage  # Default Python 3
python3.4 -m pip install SomePackage  # Specifically Python 3.4
python3.5 -m pip install SomePackage  # Specifically Python 3.5
python3.6 -m pip install SomePackage  # Specifically Python 3.6

On Windows, use the py Python launcher in combination with the -m switch:

py -2   -m pip install SomePackage  # Default Python 2
py -2.7 -m pip install SomePackage  # Specifically Python 2.7
py -3   -m pip install SomePackage  # Default Python 3
py -3.4 -m pip install SomePackage  # Specifically Python 3.4
Active reading [<https://en.wikipedia.org/wiki/Linux> <https://en.wikipedia.org/wiki/Mac_(computer)> <https://en.wikipedia.org/wiki/POSIX>]. Dressed the naked link.
Source Link
Peter Mortensen
  • 31.1k
  • 22
  • 111
  • 134

From here: https://docs.python.org/3/installing/Installing Python Modules:

Here is how to install packages for various versions that are installed at the same time on linuxLinux, macMac, posixand POSIX:

python2   -m pip install SomePackage  # defaultDefault Python 2
python2.7 -m pip install SomePackage  # specificallySpecifically Python 2.7
python3   -m pip install SomePackage  # defaultDefault Python 3
python3.4 -m pip install SomePackage  # specificallySpecifically Python 3.4
python3.5 -m pip install SomePackage  # specificallySpecifically Python 3.5
python3.6 -m pip install SomePackage  # specificallySpecifically Python 3.6

On Windows, use the py Python launcher in combination with the -m-m switch:

py -2   -m pip install SomePackage  # defaultDefault Python 2
py -2.7 -m pip install SomePackage  # specificallySpecifically Python 2.7
py -3   -m pip install SomePackage  # defaultDefault Python 3
py -3.4 -m pip install SomePackage  # specificallySpecifically Python 3.4

From here: https://docs.python.org/3/installing/

Here is how to install packages for various versions that are installed at the same time linux, mac, posix:

python2   -m pip install SomePackage  # default Python 2
python2.7 -m pip install SomePackage  # specifically Python 2.7
python3   -m pip install SomePackage  # default Python 3
python3.4 -m pip install SomePackage  # specifically Python 3.4
python3.5 -m pip install SomePackage  # specifically Python 3.5
python3.6 -m pip install SomePackage  # specifically Python 3.6

On Windows, use the py Python launcher in combination with the -m switch:

py -2   -m pip install SomePackage  # default Python 2
py -2.7 -m pip install SomePackage  # specifically Python 2.7
py -3   -m pip install SomePackage  # default Python 3
py -3.4 -m pip install SomePackage  # specifically Python 3.4

From here Installing Python Modules:

Here is how to install packages for various versions that are installed at the same time on Linux, Mac, and POSIX:

python2   -m pip install SomePackage  # Default Python 2
python2.7 -m pip install SomePackage  # Specifically Python 2.7
python3   -m pip install SomePackage  # Default Python 3
python3.4 -m pip install SomePackage  # Specifically Python 3.4
python3.5 -m pip install SomePackage  # Specifically Python 3.5
python3.6 -m pip install SomePackage  # Specifically Python 3.6

On Windows, use the py Python launcher in combination with the -m switch:

py -2   -m pip install SomePackage  # Default Python 2
py -2.7 -m pip install SomePackage  # Specifically Python 2.7
py -3   -m pip install SomePackage  # Default Python 3
py -3.4 -m pip install SomePackage  # Specifically Python 3.4
Source Link
jmunsch
  • 24.4k
  • 12
  • 102
  • 121

From here: https://docs.python.org/3/installing/

Here is how to install packages for various versions that are installed at the same time linux, mac, posix:

python2   -m pip install SomePackage  # default Python 2
python2.7 -m pip install SomePackage  # specifically Python 2.7
python3   -m pip install SomePackage  # default Python 3
python3.4 -m pip install SomePackage  # specifically Python 3.4
python3.5 -m pip install SomePackage  # specifically Python 3.5
python3.6 -m pip install SomePackage  # specifically Python 3.6

On Windows, use the py Python launcher in combination with the -m switch:

py -2   -m pip install SomePackage  # default Python 2
py -2.7 -m pip install SomePackage  # specifically Python 2.7
py -3   -m pip install SomePackage  # default Python 3
py -3.4 -m pip install SomePackage  # specifically Python 3.4