Tuesday, November 11, 2008

Strangled by Python

For the latest cool stuff I want to do with the ability views, I needed the new json library in Python 2.6. Unfortunately, there's problems with the binary release of 2.6 on the Mac. When I installed, running 'python' from the Terminal still shows 2.5.1, I think there may be other issues, but it might be related to this problem:
http://bugs.python.org/issue4017

Here's the steps I'm trying to fix it:

  1. Download 2.6 compressed source from http://www.python.org/download/
  2. Open Terminal and configure the install with './configure'
  3. Build python with 'make'.
  4. I got 'Operation Not Permitted' when I first tried to install, so I had to install with 'sudo make install'.
  5. Still didn't work, so I looked around and found 2.5 inside '/System/Libraries/Frameworks/Python.Framework/' and a symbolic link called Current. I moved 2.6 into there and remade the symbolic link to now point to 2.6 with 'ln -s 2.6 Current' (from inside the Python.Framework directory).
  6. Still didnt work, so I restarted.
  7. That didn't work, so I'm giving up for now.....


Apparently there are major issues anyways with the binary distro (see the very bottom):
http://wiki.python.org/moin/MacPython/Leopard

So I'll just wait for now, maybe find a better json serializer.

No comments: