Reputation: 604
I have been reading a lot of the tutorials around the web and answers on the site about using Homebrew
. When it comes to Python
though, the advice leaves me with more questions than answers.
I understand the how, but none of the answers I have seen so far have really explained the why behind using Homebrew
to install Python
and what the benefits are to installing Python
with Homebrew
as opposed to using OS-X
installers provided by the Python Foundation?
The newest versions of the installers from Python and the current implementation of PIP
seem to be working pretty well, so I would really appreciate any input on my question. I have worked with Python for a while but from more of a tactical, one off problem solving perspective and I am brand new to tools like Brew
and version control software such as Git
. I am trying to get up the learning curve. Finding an answer to why I would choose to go with a Homebrew
install over just heading over to python.org and downloading from them and then using pip to install packages might help me to understand the benefits of a tool like Homebrew
.
So I guess, what does Homebrew
give me that going through the installation put in place by TPF does not?
Are there advantages/disadvantages to where Homebrew
installs Python
and Python packages over the /Library/Frameworks/
and the site-packages
folder within that framework?
Though this last question is too broad and likely out of scope, if anyone would also address or provide a link to a good answer on what the benefits are of using Homebrew
in general, I'd appreciate it?
Thank you,
Upvotes: 18
Views: 8635
Reputation: 11201
A few reasons not to use system python on OS X from this post,
- Apple doesn’t always do a good job on keeping the Python runtime environment up to date,
- it can be cumbersome to play with permissions just to install third-party Python libraries,
- finally, Apple has a tendency to wipe-out your site-packages with every major OS upgrade.
The use of an independent package manager for Python modules, such as Homebrew, conda, Macports, ets. is thus preferred.
Upvotes: 4
Reputation: 34038
The big advantage of using a package manager like Homebrew is it makes it easier to keep your Python installation up to date. If you download Python from the website, then to update it means you'll need to go back to the website and download a new copy of Python (or whatever it is that you need to update that could have been installed with Homebrew).
Also, when downloading installers, I find they tend to clutter up my downloads folder and require me to periodically clean up unused files. I'd rather spend my time coding instead of managing my disk space usage.
When it comes to updating any package with Homebrew, the command is simple:
brew upgrade
And this will update all outdated packages that you installed with Brew.
Now, this isn't something unique to Homebrew. Macports, PIP, npm, Maven, and other package management tools are also able to manage the versions of modules or tools you install.
For more information, see Safari Books Online - Keeping Your Homebrew Up To Date.
Upvotes: 9