All you need for working with Python 3 on a Mac
Tags: beginnercoding, setup, beginners, python
Published: 2020-08-13 14:25:30

---
title: All you need for working with Python 3 on a Mac
published: true
date: 2018-09-08 18:50:16 UTC
tags: beginnercoding,setup,beginnersguide,python
canonical_url: https://medium.com/@martin.breuss/all-you-need-for-working-with-python-3-on-a-mac-c811ac094869
---

![](https://cdn-images-1.medium.com/max/1024/1*FyEkUvuwlT7IGHVtmD9sjA.png)

To clear up any confusion about a functioning setup to start working with Python 3 on a fresh Mac — here’s a quick (minimal) guide.

### DO #1: download and install Python 3.x.x

Go to [the official website](https://www.python.org/downloads/) and download Python from there. Yes — since you’re asking —  **do get the latest version** (the one with the shiny yellow button):

![](https://cdn-images-1.medium.com/max/1024/1*X5oLo0KLz4XZ6YQc9y5psA.png)

Execute the installer and step through the required steps…

![](https://cdn-images-1.medium.com/max/549/1*3Q0aCaGwIIZvZjo5lwCSDg.png)<figcaption>(it’s easier than that)</figcaption>

And **if you’re on Mavericks (10.9) or above, you’re (nearly) done**.

#### >> Really? Proof it!

Open your Terminal and verify by typing:

```
python3 --version
```

which should respond to you with something similar to: _Python 3.7.0_

Then type:

```
git --version
```

which should either:

- prompt you to install the command-line tools. If so, allow that install (it’ll bring version control to your life!). _This is, btw, the step that completes the “(nearly)” from above._
- or, if it’s already there, it will say something like:   
_git version 2.15.2 (Apple Git-101.1)_

Finally, you can also ask your patient terminal the following:

```
pip3 --version
```

and it will dutifully respond with a lengthy: _pip 18.0 from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip (python 3.7)_

And with that you are all set up and ready to dive into **writing code with Python 3** , and **installing whatever package** you may fancy from Python’s rich ecosystem on [pypi.org](http://pypi.org/) using **pip3** ([create a **virtual environment**](https://medium.com/@martin.breuss/virtual-environments-for-python-cc8f18a48c6c) **first**!), and indulge in the reassuring beauty of **version control** with  **git**.

#### >>> What if your OS is older than 10.9?

Update it. It’s free and makes your computer better.

If for any reason you can’t update your OS but still want to proceed working with Python 3 and git, then [get Git from here](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git):

> A macOS Git installer is maintained and available for download at the Git website, at [http://git-scm.com/download/mac](http://git-scm.com/download/mac).

![](https://cdn-images-1.medium.com/max/1024/0*DseohaM183bB7_Zh)

> You made it! Good job! Now, for your enjoyment, here’s a list of steps that are often mentioned in tutorials on how to get started, but IMO they only complicate the basic setup.

### DON’T #1: install Anaconda

Anaconda is a great **tool for data analysis** , however, it comes with [a lot of stuff](https://stackoverflow.com/a/42096429/5717580). Anaconda is a full-blown Python _distribution_ (= it’s its own _version_ of Python!), that comes with its own package manager, tons of data science packages pre-installed, and oh — did I mention it also includes _R_?!

### DON’T #2: install homebrew

Every second tutorial tells you to install homebrew first, and then use it to get python on your mac. Don’t do it. There’s no need.

I personally don’t like cellars very much, and even though I tried to homebrew a couple of years ago (I only drank it for the experience, not the taste ;) that alone can’t win me over for the easily forgettable and potentially already long-forgotten leftovers that homebrew’s _Cellar_ structure induces on my machine.

### DON’T #3: install pip

You **don’t have to force-install pip** if you download Python 3 from the official download page. It comes along voluntarily.

the [official pip site](https://pip.pypa.io/en/latest/installing/) speaks:

> pip is already installed if you are using Python 2 >=2.7.9 or Python 3 >=3.4 downloaded from [python.org](https://www.python.org/)

![](https://cdn-images-1.medium.com/max/1024/1*IauQ9ox4OojpggX1sHwGjA.png)

#### +/- useful tutorials

- [https://docs.python.org/3/using/mac.html](https://docs.python.org/3/using/mac.html)
- [https://itsevans.com/install-pip-osx/](https://itsevans.com/install-pip-osx/)
- [https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-macos](https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-macos)
- [https://docs.python-guide.org/starting/install3/osx/](https://docs.python-guide.org/starting/install3/osx/)
- [https://www.stuartellis.name/articles/mac-setup/](https://www.stuartellis.name/articles/mac-setup/)
- [https://realpython.com/python-first-steps/](https://realpython.com/python-first-steps/)

#### Other Resources

- [https://pip.pypa.io/en/latest/installing/](https://pip.pypa.io/en/latest/installing/)