Howto install Eric4 on Mac OS X with 64bit Python

When Mac OS X 10.6 (Snow Leopard) was released, 64bit Python became the default on OS X, and the question arised, how to deal with it in regard to Eric4. My old HowTo was very well received, but it covers mostly 32bit installation and therefor caused some troubles.

So instead of steadily updating it, I decided to re-publish it with my current stand of knowledge together with some corrections.

Eric4 on Mac OS X 10.6 Snow Leopard

O. Prerequisite

Take care you don’t have stripped PowerPC/Non-Intel-elements out of your system or Xcode with tools like Monolingual or the like. I constantly got errors configuring and compiling SIP/QScintilla/PyQt and thus failed installing PyQt.

Also take care, you have Xcode installed. You get it from your Snow Leopard install dvd or from http://developer.apple.com.

1. Qt4.6 / 4.7 RC

Download the current Qt for Mac from http://qt.nokia.com/downloads or the (at least for now) release candidate of Qt4.7 .

Install it like every other Mac Os X package.

2. SIP

Download the latest version or a development snapshot from http://www.riverbankcomputing.co.uk.

In Terminal:

$ tar -xvzpf sip-4.11-snapshot-c38d259c1879.tar.gz $ cd sip-4.11-snapshot-c38d259c1879 $ export MACOSX_DEPLOYMENT_TARGET=10.6 $ python configure.py -n  --arch=x86_64 -s MacOSX10.6.sdk $ make $ sudo make install

3. QScintilla

Download the latest version or a development snapshot from http://www.riverbankcomputing.co.uk.

$ tar -xvzpf QScintilla-gpl-snapshot-2.4.5-80afe6b1504a.tar.gz $ cd QScintilla-gpl-snapshot-2.4.5-80afe6b1504a $ cd Qt4 $ qmake qscintilla.pro -spec macx-g++ $ make $ sudo make install

4. PyQt

Download the latest version or a development snapshot from http://www.riverbankcomputing.co.uk.

$ tar -xvzpf PyQt-mac-gpl-snapshot-4.7.5-7088e9094087.tar.gz $ cd PyQt-mac-gpl-snapshot-4.7.5-7088e9094087 $ export QTDIR=/Developer/Applications/Qt $ python configure.py --use-arch=x86_64 (accept liense typing 'yes') $ make $ sudo make install

5. QScintilla Python bindings

Go back to the QScintilla folder to install the Python bindings.

$ cd QScintilla-gpl-snapshot-2.4.5-80afe6b1504a/Python $ python configure.py $ make $ sudo make install

6. Eric

Download it from http://eric-ide.python-projects.org:

$ tar -xvzpf eric4-4.4.0.tar.gz $ tar -xvzpf eric4-i18n-de-4.4.0.zip $ cd eric4-4.4.0 $ sudo python install.py $ sudo python install-i18n.py

Et voilà. Now you should be able to run Eric by typing in terminal

$ eric4

7. Eric App

This is just a workaround, but at least it enables you to start Eric “the Mac way” by clicking an .app or via spotlight.

Just open AppleScript-Editor, paste the following line to it:

do shell script "python /Library/Python/2.6/site-packages/eric4/eric4.py"

and save it as e.g. ‘Eric4.app’ by choosing format: Application/Program.

Afterwards you can of course still change the icon by right-click –> ‘show package content’, and replacing ‘applet.icns’ by an icon of your choice. Of course this way Eric is no standalone app.

Another approach is to use PyInstaller. It seems to still have it quirks on Mac OS X, but there are some workarounds. I haven’t tested it myself, but this site describes exactly all the necessary steps to build a standalone app with PyInstaller.

And there is still the possibility to try out py2app. I didn’t get it to work, but if you succed, please leave a comment.

8. Tips

Regarding font-settings I recommend to use a one with fixed width, e.g. I set Monaco with 12pt as default.

9. Alternatives

Alternative methods to install / run Eric on your Mac are via:

2 Kommentare zu “Howto install Eric4 on Mac OS X with 64bit Python”

  1. Jim Kellas

    Here’s updated steps for OS X Lion:
    https://gist.github.com/2563701

  2. Doug Blanding

    In step 5, when I type $ python configure.py
    I get Error: Make sure you have a working sip on your PATH or use the –sip argument to explicitly specify a working sip

Einen Kommentar schreiben