Zim on Mac OSX

Took me a bit of time and experimentation to get it working, now I have Zim running on OSX, and in the end, it was pretty painless. I think these are the steps I took.

First, install MacPorts. I downloaded the dmg then installed it. MacPorts requires XCode, but I had already installed the XCode command line tools from here (apple ID required). Every time I run anything with port, it warns about missing XCode, as I understood this, I can safely ignore the warning.

Then I found details somewhere on which packages to install. I ran this command:

sudo port install python26 py26-pygtk py26-simplejson py26-xdg

I also downloaded the zim source code package. Then I had some issues where zim wouldn’t start. Turns out I was using the default Apple version of python instead of the MacPorts version. I extracted the zim source, cd’d into the directory, and then I was able to start zim with the following command:

/opt/local/bin/python2.6 zim.py

Took a few tries to get it to start properly, but eventually I got it working. I kept re-opening it. I also had to have XQuartz installed, which I think is an OSX X implementation. Don’t know, it was already installed on my system.

If you try to follow these steps and find anything missing, let me know what to add and I’ll update this post. Hopefully this saves somebody else a bit of hassle.

12 thoughts on “Zim on Mac OSX”

  1. Forgive my ignorance, but can you clarify which directory you copied the extracted Zim files into before running the Terminal command: opt/local/bin/python2.6 zim.py ?
    Mine continues to say that no such directory exists. Thanks!

    1. I guess you’re missing a / at the beginning. It should be /opt/local/bin/python2.6 zim.py.

      You can install the sourcecode anywhere. I often put stuff in a ~/bin folder, but anywhere will do. Just make sure you’re in that directory when you run the command from the terminal. Try running ls first and see if there’s a file called zim.py. 🙂

      1. Thanks, that solved it. Actually, your mention of the command ‘ls’ solved it . I am unfamiliar (afraid?) with Terminal and so did not know that I could use ‘ls’ to see which directory I was in nor that I could use ‘cd dirname’ to change it.
        So, I simply moved the Zim files somewhere convenient, redirected my terminal command, and then launched as you suggested.
        I did need to change

        1. …need to change /opt/local/bin/python2.6 zim.py to /opt/local/bin/python zim.py
          (since I have a later version of python and since I redirected my default python to be python2.7, but that may be different for other users?).
          In any case, it works now, so thank you very much!

        2. Glad you got it sorted. You can use pwd to see which directory you’re in also, a little trick. 🙂

          It’s also possible to build an “application” that runs the terminal command for you using Automator. I did that, so I can launch it like a regular application and Zim pops up. 🙂

  2. Thanks for posting this! This article helped me install the needed dependencies, while [this](http://docs.gz.ro/node/183) article helped me put a clean App wrapper around it.

    Lastly, I modified the icon of the new Platypus-generated app to match Zim’s icon by:

    1) Opening the \icons\zim.ico file
    2) Cmd + A to select all
    3) Cmd + C to copy the image contents
    4) Right-click on the Zim.app icon, and choose Get Info
    5) Click on the Icon at the top of the dialog
    6) Cmd + V to paste the new icon on top

  3. Hello!
    I am not able to install python properly. I get the following error:

    MacBookAlineDelTorre-2:zim-0.65 alinedeltorre$ sudo port install python26 py26-pygtk py26-simplejson py26-xdg
    Error: Cannot install python26 for the arch(s) ‘x86_64’ because
    Error: its dependency zlib is only installed for the archs ‘i386 ppc’.
    Error: Unable to execute port: architecture mismatch
    MacBookAlineDelTorre-2:zim-0.65 alinedeltorre$

    I don’t really understand the problem, because I always believed to have an 32 bit system. (MacBook early 2008).
    Could you help me?

Leave a Reply

Your email address will not be published. Required fields are marked *