2

After going through hell trying to install the latest version of postgresql and psycopg2 today I'm going for a complete reinstall of Leopard.

I've been sticking with macpython 2.5 for the past year but now I'm considering macports even 2.6

For me it's most important for Twisted, PIL and psycopg2 to be working without a problem.

Can anyone give some guidelines for what version I should choose, based on experience?

Edit:

Ok I've decided to go without reinstalling the os. Hacked around to clean up the bad PostgresPlus installation and installed another one. The official python 2.6.1 package works great, no problem installing it alongside 2.5.2. Psycopg2 works. But as expected PIL wont compile.

I guess I'll be switching between the 2.5 from macports and the official 2.6 for different tasks, since I know the macports python has it's issues with some packages.

Another Edit:

I've now compiled PIL. Had to hide the whole macports directory and half the xcode libraries, so it would find the right ones. It wouldn't accept the paths I was feeding it. PIL is notorious for this on leopard.

10 Answers 10

4

You can install them side-by-side. If you've encounter problems just set python 2.5 as the standard python and use e.g. python26 for a newer version.

1
  • Yes, I currently have the one that ships with leopard and a newer macports version of 2.5, just masking the original one.
    – Vasil
    Mar 16, 2009 at 19:19
3

Read this

http://farmdev.com/thoughts/66/python-3-0-on-mac-os-x-alongside-2-6-2-5-etc-/

3

I still use macports python25, because so many other packages depend on it, and have not updated to use python26.

$ port dependents python25
gnome-doc-utils depends on python25
mod_python25 depends on python25
postgresql83 depends on python25
gtk-doc depends on python25
at-spi depends on python25
gnome-desktop depends on python25
mercurial depends on python25

And that's excluding the py25-* packages I have installed.

2

I wrote something today on this very subject, my recommendation? Run multiple version, and slap virtualenv down to compartmentalize things.

http://jessenoller.com/2009/03/16/so-you-want-to-use-python-on-the-mac/

I also wouldn't both with macports. I don't see a need for it.

1

I've updated my macbook running leopard to python 2.6 and haven't had any problems with psycopg2. For that matter, I haven't had any compatibility issues anywhere with 2.6, but obviously switching to python3k isn't exactly recommended if you're concerned about backwards compatibility.

2
  • Do you run the macports version of 2.6? Thanks.
    – Vasil
    Mar 16, 2009 at 19:17
  • I've always ran official, so I can't speak for macports
    – Keck
    Mar 17, 2009 at 14:51
1

I would stick with the MacPython version 2.5.x (I believe 2.5.4 currently). Here's my rationale:

  1. Snow Leopard may still be on the 2.5 series, so you might as well be consistent with the future OS (i.e. no point in going too far ahead).
  2. For most production apps, nobody is going to want to use 2.6 for another year.
  3. No frameworks/programs are going to leave 2.5 behind for at least 2 years.

In other words, my approach is that the only reason to do 2.6 is for fun. If you're looking to have fun, just go for 3.0.

1

I use both Twisted and Psycopg2 extensively on OSX, and both work fine with Python 2.6. Neither has been ported to Python 3.0, as far as I know.

Several of Python 3.0's features have been back-ported to 2.6, so you gain quite a bit by moving from 2.5 to 2.6. But I wouldn't switch to 3.0 until all of your thirdparty libraries support it; and this may not happen for some time.

1

I had some trouble installing PIL. I compiled it and it worked with the modification explained on this post http://passingcuriosity.com/2009/installing-pil-on-mac-os-x-leopard/ After that it worked fine.

1
  • Yes. I've found that having Macports installed is a huge problem when compiling PIL. I solve this by temporarily hiding the /opt directory before compiling PIL. PIL can also have conflicts with some other libraries from Apple, again temporarily hiding those solves it.
    – Vasil
    May 15, 2009 at 12:34
0

I am using Python 2.5.1. It's working great for me for general scripting and some CherryPy web projects.

0

If your using Macports, I recommend downloading the python_select package, which facilitates easy switching between different versions including the built in apple versions. Makes life a lot easier.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.