adamrork
adamrork

Reputation: 91

Why brew install a python package instead of pip install (or vice-versa)?

I know that you're generally 'supposed' to $ pip install <python package> if the package is not brewed, but what if there is a python package that you want to install that you can use either $ pip install or $ brew install for? For example, is there any benefit to installing a package such as numpy via $ pip3 install numpy versus $ brew install numpy other than keeping up with updates, etc.?

I already have them installed, so it's not an issue either way, but I was curious as to what potential benefits one may hold over the other

Upvotes: 5

Views: 4757

Answers (1)

sidd607
sidd607

Reputation: 1409

pip is a packager for Python you should only ever be able to install python-things with it.

homebrew is a package manager for OSX. You can install any software with it. It does not impose any restrictions on the type of software to install. Python can be installed via homebrew. Installing things with homebrew will install them into /usr/local

Installing things with pip will fetch packages from the Python Package Index, and it will install them in a place where your python interpreter will find them, normally in some global search-path of your python interpreter (e.g. /usr/local/lib/python2.7/dist-packages/), or into your home directory (e.g. ~/.local/lib/python2.7/site-packages/)

Upvotes: 2

Related Questions