5

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

adamrork
  • 91
  • 2
  • 6
  • 2
    To prevent conflicts, I find it easier to use pip as brew will install python packages in `/usr/local` and this is not necessarily in the PYTHONPATH. On the other hand, pip will install packages where the relevant python installation can find them. Mix installing packages from brew and pip at your own peril. –  Dec 29 '17 at 06:47
  • 1
    Question was asked here [https://stackoverflow.com/questions/32530506/is-there-a-difference-between-brew-install-and-pip-install], may be useful, but I don't see any 'conclusive' answer. – Deem Dec 29 '17 at 06:47

1 Answers1

2

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/)

Tom de Geus
  • 5,625
  • 2
  • 33
  • 77
sidd607
  • 1,339
  • 2
  • 18
  • 29