Official installer vs homebrew install for python

A forum for general discussion of the Python programming language.

Official installer vs homebrew install for python

Postby sc25893 » Tue Aug 20, 2013 6:54 pm

Hi,

I've been working with python for a couple of months now so still on pretty basic stuff. I installed python (2.7.5 and 3.3.2) via the official channel here:

http://www.python.org/getit/

...and I have been using them to code some stuff in Eclipse (I installed pydev). I've now been reading about virtualenv, pip etc here (using homebrew package manager to install):

https://pypi.python.org/pypi/virtualenv

...and another post here with a heading of 'Doing it right' when it comes to installing python:

http://docs.python-guide.org/en/latest/ ... l/osx.html

Although I'm new to this, I am very interested in trying out Django in the future, so I came across this:

http://www.jeffknupp.com/blog/2012/02/0 ... right-way/

...which also talks of virtualenv & pip. There is also 'python install' and 'python framework install'. It's all a bit overwhelming and I can't find a decent resource that talks of what the actual difference is between the official installer and a homebrew one.

I can appreciate the idea of a virtual environment as a closed container as to not interfere with other projects (like I do with gemsets in ruby version manager to use specific versions of ruby gems per project).

However, I'm just a bit confused about all the terminology and what actual methods people use to get projects up and running. If anyone could clear some of this stuff up it would be very helpful or maybe suggest some better learning resources. Perhaps this post is a bit rambling but it represents what's going on in my head right now as I approach getting python up and running in a way other than the official installer.

Homebrew seems like it would be very useful to me as I could get ruby rvm, drush, pip, virtualenv, python, all set up in one fell swoop but I would really appreciate some input before diving in and messing everything up. Thanks in advance.

*edit*

And this link too:

http://hackercodex.com/guide/python-vir ... lion-10.8/
sc25893
 
Posts: 23
Joined: Sat May 18, 2013 2:51 pm

Re: Official installer vs homebrew install for python

Postby micseydel » Tue Aug 20, 2013 9:20 pm

My experience with OS X was that I had official installations, Homebrew installations, and some thing else on top of that that was purple or a bird or something (Pidgin comes to mind, but it's obviously not that) and none of them played nice with each other, and none of them provided all the third party modules I wanted. Part of why I ditched OS X for Linux, in spite of Spotlight and the multi-touch keyboard, both of which I really miss, was that nothing played nice with each other. Different Python installs only worked with their own locally installed third party modules. It wasn't a feature, like virtualenv, it was just a limitation.

That said, it was about three years ago that I had that experience. Perhaps things have progressed since then. But I would definitely recommend using one thing and sticking to it, and pip and virtualenv both work on Linux too, and I'm a fan of using multi-platform tools where possible instead of something like Homebrew which is Mac specific.

As for actual experience... before I learned about virtualenv, which as you noticed is super awesome, I had everything installed alongside everything else, and everything used the same most recent (Python 2.7.x) version. I luckily never came across any versioning issues. If I was given a production machine for a new project, I would certainly use virtualenv instead of just installing everything to a central site-packages directory, because even though you might get away with it, when you don't really bites you in the ass. (Some co-workers of mine had a project which required a particular version of pygame, and a particular version of sqlalchemy or something of the like, and had issues that were resolved once they used virtualenv properly. Keeping all installs through pip also helped, IIRC.)

Also, anything of importance I've seen deployed has always been in Linux. That doesn't mean that you shouldn't use OS X, it just means that my recommendation for using the standard Linux tools should work on OS X but if it doesn't, then I don't know what to say.
Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
User avatar
micseydel
 
Posts: 1229
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: Official installer vs homebrew install for python

Postby sc25893 » Wed Aug 21, 2013 9:15 am

Thanks for the response. I've not finished paying for my macbook so I'm not in any rush right now to switch to linux. Besides, I've tried linux on a few different laptops, and each one had the same issues that I posted a number of times on mint/ubuntu forums. This is why I switched from linux to OSX and much happier! :)

But I would definitely recommend using one thing and sticking to it, and pip and virtualenv both work on Linux too, and I'm a fan of using multi-platform tools where possible instead of something like Homebrew which is Mac specific.


I can't find a way to install these things without homebrew, every guide seems to start "Install homebrew.... then....". It seems the more time I muck about with this means the less time I'm actually learning python, which is probably quite essential! Maybe just using the official installer would be a good idea right now.
sc25893
 
Posts: 23
Joined: Sat May 18, 2013 2:51 pm

Re: Official installer vs homebrew install for python

Postby micseydel » Wed Aug 21, 2013 9:19 am

If you must install Homebrew for something like pip, just make sure you only use pip after that rather than installing things just through Homebrew (IIRC that's how it worked).

You can run Linux in VirtualBox and avoid many of the issues, having a solid dev environment and then OS X as your Facebook machine ;)
Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
User avatar
micseydel
 
Posts: 1229
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: Official installer vs homebrew install for python

Postby sc25893 » Wed Aug 21, 2013 9:44 am

Virtualbox looks like a pretty good idea, will give that a try at some point. I used to dual boot win7 and ubuntu and although I really enjoyed ubuntu, it was the issues that made me switch. Maybe a virtual ubuntu would be the answer.
sc25893
 
Posts: 23
Joined: Sat May 18, 2013 2:51 pm


Return to General Discussions

Who is online

Users browsing this forum: buran and 4 guests