Skip to content

Instantly share code, notes, and snippets.

@jacebrowning
Last active August 29, 2015 14:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacebrowning/0b180242d45dbda0846d to your computer and use it in GitHub Desktop.
Save jacebrowning/0b180242d45dbda0846d to your computer and use it in GitHub Desktop.
Bootstraps a Python 3 installation on a new Mac.
#/bin/sh
# ======================================================================
# 1. Click the spotlight icon
# 2. Type "terminal" and press enter
# 3. In the new window, type "gcc" and press enter
# 4. If another dialog appears, click Install and wait for completion
# 5. Click the spotlight icon
# 6. Type "terminal" and press enter
# 7. Copy all of the lines below this block
# 8. Switch to Terminal.app and paste the clipboard
# ======================================================================
which -a python3 && which -a pip3
if [ $? -ne 0 ]; then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew install python3
fi
python3 -c '
import pip
import platform
python_version = platform.python_version()
pip_version = pip.__version__
assert python_version.startswith("3.")
print()
print("python %s" % python_version)
print("pip %s" % pip_version)
print()
'
which -a python3 && which -a pip3
@jacebrowning
Copy link
Author

If this works, you should be able to run something like:

$ pip3 install --upgrade DropTheBeat
$ DropTheBeat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment