Sunday, 20 December 2009

MacPorts

Today I 'av mainly been wondering how I will remember the stuff I need to know in order to use MacPorts. This blog will be a memory jogger.

It is a prerequisite to install X11 (from your Snow Leopard disk) and download XCode from Apple (You will need to register).

$ port help
$ port search py26 # find all packages for python 2.6
$ sudo port install py26-django # install a package with all dependencies
$ port installed # list what you have installed
$ port deps openssl # show package dependencies
$ port outdated # show what needs updating

$ sudo port selfupdate # check for macports update
$ sudo port upgrade outdated # check for updated packaes

MacPorts are here.

For me (today) I think its easier to use than fink. The only thing I miss is a native aqua version of Tk.

Just in case I have to do this again:

$ history | grep 'sudo port'
  sudo port install python26
  sudo port install python_select
  sudo port install py26-pil
  sudo port install py26-django
  sudo port install py26-pyqt4
  sudo port install py26-docutils
  sudo port install qscintilla
  sudo port install py26-matplotlib
  sudo port install py26-matpltlib-basemap

$ history | grep select
  192  sudo python_select python26

Thursday, 17 December 2009

PIL on Snow Leopard

Today I 'ave mainly been thinking how to install Python Imaging Library on OS X 10.6.

It was all going so well...

But when I came to do some mods to some old python  stuff I found that Python Image Library was not installed with Apple Python 2.6. No problem just download and install PIL. Well no... It did not just work like it usually would, then I started reading various posts about the problems and possible solutions.

In the past I have used fink but have always felt was a bit awkward. My preferred solution would be to install PIL on top of Apple Python and carry on!

Today I am attempting to install python2.6.4 using MacPorts. Its a long process so no idea if it will finish before I fall asleep. However I will tell the story here if I find out how to do it.

Download mac ports from here.
Install in the usual way.

$ sudo port install python26 # this takes a long time
$ sudo port install python_select
$ sudo python_select python26
$ sudo port install py26-pil
$ sudo port install py26-django
$ sudo port install py26-pyqt4 # this takes a long time
$ suso port install py26-docutils

MacPorts .. seems simple enough to me.

Tkinter apps look a bit too much X11 like for me but Qt looks like it always does. Seems a bit of a shame because Apple python seems difficult to upgrade. I assume its a 32/64 bit compatibility problem that will go away in time.

Saturday, 12 December 2009

Google Chrome for Mac OS X

Today I 'ave mainly been trying the new Google browser on my MacBook.  First impressions are good.

You should try it. Look here for more information.