Skip to content

Instantly share code, notes, and snippets.

@Daeinar
Created December 26, 2012 22:34
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save Daeinar/4383663 to your computer and use it in GitHub Desktop.
Save Daeinar/4383663 to your computer and use it in GitHub Desktop.
Install pip packages with homebrew
Install pip packages with homebrew:
1. Install Homebrew
http://mxcl.github.com/homebrew/
2. Install the brew-pip package
brew install brew-pip
3. Add Homebrew's pip path to your PYTHONPATH environment variable (you probably should add this to some sort of shell initialization file like ~/.bashrc or ~/.zshrc)
export PYTHONPATH=$(brew --prefix)/lib/python2.7/site-packages
3. Now install any pip pacakges with Homebrew!
brew pip Glances
@mattpackwood
Copy link

You can use Python's venv like described here.

However if you really want to install packages that way, then there are a couple of solutions:

use pip's argument --break-system-packages,
add following lines to ~/.config/pip/pip.conf:

[global]
break-system-packages = true

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