Skip to content

Instantly share code, notes, and snippets.

@nootrope
Last active April 10, 2016 14:49
Show Gist options
  • Save nootrope/58d001f983677e54e179e79cbb0b94b2 to your computer and use it in GitHub Desktop.
Save nootrope/58d001f983677e54e179e79cbb0b94b2 to your computer and use it in GitHub Desktop.
About Installing Pythons with Homebrew

If you use Homebrew to install Python and Python3, make sure to install python3 first. Otherwise, when trying to upgrade pip3 withpip3 install --upgrade pip it will clobber default command pip and link it to the python3 packages, i.e., pip3.

To avoid a lot of wasted time and relinking I do this:

# First install Python3
$ brew install python3
$ brew linkapps python3
$ pip3 install --upgrade pip setuptools
# Then install Python 2
$ brew install python
$ brew linkapps python
$ pip install --upgrade pip setuptools

Thereafter, working only within virtualenvs makes moot that conflict. See this article for a setup which is only missing the installation/use of virtualenvwrapper.

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