Skip to content

Commit

Permalink
Grammar fixes + updates to Python on Mac instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
mhucka committed Jul 19, 2020
1 parent 556127c commit 9591813
Showing 1 changed file with 19 additions and 26 deletions.
45 changes: 19 additions & 26 deletions INSTALL-Python3.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,19 @@

# Install Python 3.x

Getting your Python setup right on your system is important.
Otherwise you find yourself in the realm of confusing error messages.
This documents focuses on getting Python 3 up and running on
Debian/Ubuntu Linux based systems as well as on macOS via MacPorts.
Your milleage may very.
Getting your Python setup right on your system is important; otherwise, you may find yourself in the realm of confusing error messages. The following instructions focus on getting Python 3 running on Debian/Ubuntu Linux-based systems as well as on macOS via MacPorts or HomeBrew.

> If you are running on an Intel style processor (e.g. most Macs and Windows
> machines) you can use a Python distribution called [Miniconda](https://docs.conda.io/en/latest/miniconda.html).
> This is often the easiest approach to getting a modern Python on your machine. Otherwise continue
> on reading.
_**Tip**: If you are running on an Intel-based computers (e.g., most Macs and Windows machines), you can use a Python distribution called [Miniconda](https://docs.conda.io/en/latest/miniconda.html). This is often the easiest approach to getting a modern Python on your machine. If that's not suitable for you for any reason, continue on reading._

## Python versions issues

It is possible to use your default OS provided python if it is version
greater than 3.x. Many distributions still ship with version 2.7 out of the box
and pipy's pip corresponding to version 2.7. On some systems, a version of 3.x
is available using the commands `python3` and `pip3`. Others let you install
Python 3 and its pip via their package manager and use the package manager
select default versions and/or names. This is true on Debian/Ubuntu based systems as
well as macOS's MacPorts.
It is possible to use your default OS-provided Python if it is version greater than 3.x. Many distributions still ship with version 2.7 out of the box and with `pip` command versions corresponding to version 2.7. On some systems, a version of 3.x is available using the commands `python3` and `pip3`. Others let you install Python 3 and `pip` via their package manager and use the package manager select default versions and/or names. This is true on Debian/Ubuntu based systems as well as macOS's MacPorts.


## Getting the right Python and Pip
## Getting the right Python and `pip`

### Debian/Ubuntu

Debian based systems still ship with older versions of Python by
Debian-based systems still ship with older versions of Python by
default. We want to use a modern Python 3.x. Make sure it is
installed and available along with the related version of pip.

Expand All @@ -37,24 +23,31 @@ sudo apt install python3 python3-pip

### macOS with MacPorts

If you are using macOS and MacPorts you can take a similar
approach (presumably Homebrew for macOS uses the Debian
style commands)
If you are using macOS and MacPorts you can take a similar approach:

```
sudo port install python38
sudo port install python3
sudo port install py38-pip
```

At this point you should be able to envoke the Python interpreter
using the `python3` command. You should see the version
of python and pip with these commands.
At this point you should be able to envoke the Python interpreter using the `python3` command. You should see the version of Python and `pip` with these commands:

```
python3 --version
python3 -m pip --version
```

### macOS with HomeBrew

If you are using macOS and HomeBrew, the corresponding commands are as follows:

```
sudo brew install python3
```

HomeBrew's Python 3 package installs `pip3` by default. Unless you configured your copy of HomeBrew to install it elsewhere, programs should end up in `/usr/local/bin` on your computer. Look for a version of `pip` there (e.g., by running the command `ls /usr/local/bin/pip*` to see what gets listed).


### Install Python modules using the right pip

Often you'll need some additional modules with your
Expand Down

0 comments on commit 9591813

Please sign in to comment.