wxPython in Houdini 9.5 OSX

Recommended Posts

I have just downloaded and installed the ansi version of wxPython for OSX. When running a basic wxPython script using the default Python 2.5.2 install on OSX it works fine. I then proceeded to copy the "wx" folder of the newly installed wxPython over to my $HFS/houdini/scripts folder, and attempted to execute the same script within Houdini using its inbuilt version of python, I receive the following error:

Traceback (most recent call last):

File "wxTest", line 1, in <module>

File "//usr/local/lib/wxPython-ansi-2.8.8.1/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/__init__.py", line 45, in <module>

from wx._core import *

File "//usr/local/lib/wxPython-ansi-2.8.8.1/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/_core.py", line 4, in <module>

I'm unsure if this is the correct workflow for executing wxPython scripts within the OSX version of Houdini, but I had no problem using this method running a previous version of Houdini in Windows. I very much appreciate any advice as to how I may solve this issue. I don't know if the latest version of the wxPython binary for OSX is compatible with the Houdini 9.5 OSX version of Python or if I am simply using the wrong binary or taking the incorrect approach.

Thanks in advance for any assistance!

Sam.

Share this post

Link to post

Share on other sites

I'm not on OSX but from the conversations I've seen, Houdini on OSX uses the system installed version of python (unlike Windows). This means that if wxPython is installed on your system python, then that should be enough. There's no need to copy it over.

Share this post

Link to post

Share on other sites

I have just downloaded and installed the ansi version of wxPython for OSX. When running a basic wxPython script using the default Python 2.5.2 install on OSX it works fine. I then proceeded to copy the "wx" folder of the newly installed wxPython over to my $HFS/houdini/scripts folder, and attempted to execute the same script within Houdini using its inbuilt version of python, I receive the following error:

I'm unsure if this is the correct workflow for executing wxPython scripts within the OSX version of Houdini, but I had no problem using this method running a previous version of Houdini in Windows. I very much appreciate any advice as to how I may solve this issue. I don't know if the latest version of the wxPython binary for OSX is compatible with the Houdini 9.5 OSX version of Python or if I am simply using the wrong binary or taking the incorrect approach.

There's no x86_64 architecture in the list. That is the architecture that Houdini is built with. So, that is why importing wx does not work.

Normally I would just suggest that you build a 64-bit version yourself, however, there is a good reason why Apple does not ship it. Wx uses the Carbon GUI toolkit which is deprecated. Apple does not support building 64-bit Carbon applications. So, wx cannot be ported to 64-bit OS X unless someone rewrites it to use Cocoa as the underlying technology.

How much wxPython code do you have? I am very interested to know how this limitation will affect people.

If you are looking for a GUI toolkit to use with Houdini on OS X, I would strongly recommend that you use the Python Cocoa bindings that are supported by Apple.