Skip to content

Latest commit

 

History

History
39 lines (33 loc) · 920 Bytes

File metadata and controls

39 lines (33 loc) · 920 Bytes

title: Install Python 2 and/or 3 updated: 2013-07-13 00:00:00 os: [macosx] deps: [install-homebrew] tags: [python] contributors: ["http://www.github.com/sloria"]

# On Mac >= 10.5 with homebrew
$ brew update
## Install Python 2
$ brew install python
## Install Python 3
$ brew install python3
## Follow any instructions that appear after each brew install

Make sure to follow the instructions after each install. If you missed them, just run brew info python or brew info python3.

If it still doesn't work, try to fix every issue listed when you run brew doctor.

# Is everything working?
$ brew doctor
# Listen to the doctor

If everything's working, you can run both Python 2 and Python 3 on the same system.

# Run Python 2
$ python
# Run Python 3
$ python3
# Install a Python 2 package
$ pip install some-package
# Install a Python 3 package
$ pip3 install some-package