As of late 2012, these instructions are no longer needed. Current versions of Cura have much better Mac OS packaging, and are able to install necessary dependencies without external assistance. I’m retaining this post for historical value, but it should no longer be necessary to follow these steps.

These instructions are based on experiments with Cura RC4. Running this version requires Python 2.7, and the associated versions of wxPython (which is the version that uses the OS X ‘Cocoa’ libraries, and hence requires a 64-bit capable version of Python).

It can be tricky to satisfy all of these dependencies at once, especially since Snow Leopard (OS X 10.6) ships only with Python 2.6. On Lion (OS X 10.7) things are simpler, since the OS ships with 64-bit Python 2.7 as the default.  However, the following steps should get everything working in either case. You will need administrator/sudo privileges on the machine.

 

Start by downloading the files you will need. If you are running Snow Leopard, download these two modules:

1) Download Python 2.7.3 for Mac OS X 10.6 and 10.7 from http://www.python.org/download/releases/2.7.3/

2) Download  the Python 2.7 version of setup tools from http://pypi.python.org/pypi/setuptools#files. This will provide the Python 2.7 version of easy_install. If the file gets downloaded with a ‘.sh’ extension, rename it to end ‘.egg’. To do this, open a terminal window, cd to the directory you downloaded the file into, and type the following command (adjusting the name of the file if the current version you downloaded was different):

     mv setuptools-0.6c11-py2.7.egg.sh setuptools-0.6c11-py2.7.egg

 

Then, whether you are running either Snow Leopard or Lion:

3) Download the Python 2.7/Cocoa version of wxPython as listed on http://www.wxpython.org/download.php
Next, install the downloaded files. For Snow Leopard:

4) Open the Python 2.7.3 disk image file from step 1), and run the installer ‘python.mpkg’.

5) Open a new terminal window, cd to the directory that you downloaded the setuptools egg file into in step 2) above, and run:

       sh setuptools-0.6c11-py2.7.egg

 

From this point on, the instructions are the same for either operating system:

6) Open the wxPython disk image, and run the wxPython installer downloaded in step 3).

 

Next, install a couple more Python modules needed by Cura:

7) In a new terminal window, run:

       sudo easy_install PyOpenGL

Log in with your Mac OS password, if prompted for a password.

8) Then run:

       sudo easy_install pyserial

Now you should be ready to run Cura. Download it, if necessary, and then you have two options to run it, as follows:

9) In terminal, cd into the cura folder and then type:

       ./cura.sh

10) Alternatively, in the finder, change the file named cura.sh to cura.command, and then simply double-click it to run it.

The above steps have been tested on a fresh install of OS X 10.7 and OS X 10.6.8. However, if you have previously tried other methods to install the necessary components, it is easy to end up with a mess of different versions of the tools, installed into different versions of Python. It may be helpful to remember that you can specifically run the version 2.7 instances of python and easy_install by using the version-specific flavors:

       python2.7

and

       easy_install-2.7

For instance, to force Cura to run under Python 2.7, even if that is not the default version of Python on your system then you can replace all the occurrences of the command ‘python’ in cura.sh, with ‘python2.7’ (assuming that you have at least installed Python 2.7 either using the installer referenced above, or a similar package via MacPorts, fink or similar tools).

 

4 Responses to Running Cura on OS X

  1. Allan says:

    Hello there,

    T-H-A-N-K-S!!!!!

    Amazing instructions!
    Finally, after many many times trying to install Cura on OS X, a well written, thorough, idiot proof guide.

    You rock.

    If you ever drop by Barcelona, Spain,

    Beers are on me.

    Thanks again and cheers!

  2. Nice instructions, I followed them very carefully, but they didn’t work out at once for me (on OSX 10.6.8).

    Some remarks:
    * I found out too late that I was stil running Python 2.6.something. So first check what version you are running. You can do that with:
    python -V
    If it’s 2.7 you don’t need to update an can continue. If it’s not update and I had to reboot the computer to make it run 2.7.

    * After all that I got the error
    ImportError: No module named numpy
    I tried:

    sudo easy_install numpy

    But when running again I got this error (among others):

    don't know how to compile Fortran code on platform 'posix'

    In the end I found a solution for installing numpy for python 2.7 here:
    http://my.opera.com/Smeets/blog/python-2-7-numpy-and-scipy-for-os-x
    sudo easy_install-2.7 pip
    and then to run cd to the Cura folder and use:
    ./cura.command
    (the .sh is not there anymore)
    And it WORKS !!!

  3. OOPS, one addition:
    after sudo easy_install-2.7 pip
    run sudo pip install numpy
    ( of course 😉 )

  4. illuminarti says:

    Thanks for the updates, Remko. The dependency on numpy got added after I wrote this originally. Fortunately, by late 2012, Daid significantly improved the Mac bundle for Cura, so most of these instructions are no longer needed.

Leave a Reply

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

%d bloggers like this: