Tuesday, 28 February 2012

SPE, 32 bit wxPython, Python on Mac

Jumped a couple of hoops to install SPE my favourite python IDE in Mac,
Python 2.7 ships with Lion (yeah!)

I need to install wxPython but only 32 bit is avail due to Carbon API ( boo )

the nice thing is that you can set an env to make it work
so my bash script for starting SPE is

#installed 32 bit version of wxPython
export VERSIONER_PYTHON_PREFER_32_BIT=yes
python _spe/SPE.py




It works! 

SPE v0.8.4.i (c)2003-2008 www.stani.be
If spe fails to start:
 - type "pythonw SPE.py --debug > debug.txt 2>&1" at the command prompt
   (or if you use tcsh: "pythonw SPE.py --debug >& debug.txt")
 - send debug.txt with some info to spe.stani.be[at]gmail.com




4 comments:

  1. Hey Kevin,

    I came across this post, and found it very useful, as when I installed SPE it just bounces in my dock, and does nothing. So I found that wxPython needed to be installed. Installed that, and ran the three lines of code you have above:

    #installed 32 bit version of wxPython
    export VERSIONER_PYTHON_PREFER_32_BIT=yes
    python _spe/SPE.py

    If I run this it works no problem brings up SPE, but what I am trying to figure out is how do I make it so the Icon in the dock will open the application like I was running those lines of code?

    This may be a stupid question to some, but I am new to Mac, and the Linux OS's altogether. This is a learning process for me. So if you could assist I would really appreciate the assistance.

    Justin

    ReplyDelete
    Replies
    1. I get a syntax error on that second line. OSX 10.7.4

      Delete
    2. I am on OSX 10.7.4 as well.
      can you describe your syntax error?

      kev@Mac:~/bin$ cat spe-mac.sh
      #installed 32 bit version of wxPython
      export VERSIONER_PYTHON_PREFER_32_BIT=yes
      python ~/bin/_spe/SPE.py
      ------------------------------------------------------------------------------------------------------------------------------------ 11:23:10
      kev@Mac:~/bin$ sh spe-mac.sh

      Delete
  2. Oh hmmm I believe if u save the bash script as SPE.command it may work .. .command is the ext that Mac uses to recognise bash/terminal scripts ...

    ReplyDelete

Datanami, Woe be me