[Tutor] databases

Alan Gauld alan.gauld at btinternet.com
Sun Sep 11 10:34:38 CEST 2011

On 11/09/11 06:19, Alejandro Companioni wrote:

> I had the same thoughts at first: OS X is just BSD! This can't be too
> different from a Linux installation, right?
> There are a number of problems with mysql-python--chiefly its poor
> maintenance. I'll link to a nine (!) step guide on installing
> mysql-python on Mac as an example:
> http://friendlybit.com/tutorial/install-mysql-python-on-mac-os-x-leopard/

Hmm, That's not really that difficult, about the same as on any standard 
Unix system. I guess its much harder than the usual MacOS install 
though, so for a Mac user would seem pretty bad.

> At Step 9 the author suggests using setuptools even though it will fail,
> and you'd actually have to patch a (old, well-documented) bug yourself.

Yeah, but he could have shortened it slightly by telling you about the 
types.h bug at step 7 rather than wait till it failed!... But its a pity 
they MySQL folks haven't fixed that yet. Then it would only have been a 
7 step process.

Also I suspect you don't really need to download the full Developers 
Tools(XCode) you could probably just use the gcc compiler which
is much smaller from Macports or Fink.

OTOH IF you are using Python on a Mac then using XCode as your IDE is
a good idea! Especially if you want to write Mac GUIs. And if you 
already had XCode installed then the process would go dowen to 5 
steps... And as one commentator said the Developer tools are on the 
MacOS DVD, you don't need to download them and register on the site 
(although that's a good idea too)

 > ....Not a good start for a new Python coder,

I can see it might be intimidating to a Mac user trying to get into 
programming. But OTOH wouldn't setting up a Linux VM be even more

But sadly as a programmer that kind of installation routine is
fairly normal(*). Developers are expected to be fairly savvy
about how their computer works so slick installation tools
are rarely a high priority... And in fact some developers don't like 
fancy installers that do all the setup for them because they have set up 
their machines "just so" for their own ends and want complete control. 
You can't please everyone...

(*)I once worked on a project that required Oracle 6 to be installed on 
our Sun server and after two days I got it working. I then documented 
the process for the rest of the team. It was 22 steps and even after 
doing it a half dozen times it still took several hours to complete. 
Thankfully Oracle have improved their installers nowadays! :-)

Alan G
Author of the Learn to Program web site

More information about the Tutor mailing list