Jump to content

How to install wxPython for houdini in Ubuntu?


ranw0477

Recommended Posts

Hi,

I am a user of houdini 10.0.528 and working on Ubuntu 9.04, after I installed the latest wxpython 2.8.10.1, when I try to import wx module, I got error like this:

Traceback (most recent call last):

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

File "/opt/hfs10.0.528/houdini/scripts/python/wx/__init__.py", line 45, in

<module>

from wx._core import *

File "/opt/hfs10.0.528/houdini/scripts/python/wx/_core.py", line 62, in <module>

_core_._wxPySetDictionary(vars())

TypeError: _wxPySetDictionary must have dictionary object!

Does anyone has this kind of experience and know how to fix it?

One Note here: The build in python version in Ubuntu9.04 is 2.6, when I install the wxPython using apt, it automatically installed in the python 2.6 folder, so was this the reason for my problem?

Thanks!

Edited by rGarfield
Link to comment
Share on other sites

You shouldn't have to install anything into the Houdini install directory like you do to get it to work in Windows. On linux, Houdini will use the actual system version of Python by default, as opposed to the Python libs inside the install directory. All you need to do on Ubuntu is to install wxPython for Python2.5 in your system using apt/whatever the dialog manager is called now and you will be good to go. Same goes for PyQt. As long as the system has it installed properly Houdini will find it. Unfortunately Windows/Mac OSX don't work this way as well.

Link to comment
Share on other sites

You shouldn't have to install anything into the Houdini install directory like you do to get it to work in Windows. On linux, Houdini will use the actual system version of Python by default, as opposed to the Python libs inside the install directory. All you need to do on Ubuntu is to install wxPython for Python2.5 in your system using apt/whatever the dialog manager is called now and you will be good to go. Same goes for PyQt. As long as the system has it installed properly Houdini will find it. Unfortunately Windows/Mac OSX don't work this way as well.

Hi,

Thanks for your advice, but that is how I installed it in ubuntu, by using apt install following the instruction in wxPyhton webpage. The problem happens when I try to import it. In tutorial 3D buzz presented, they showed how to install it in windows, by chose the ansi version and said houdini only support ansi version till now. But when I install using apt, there is no such option for me to choos to use unicode or ansi version, I wonder if that was the core of my problem. Have you ever tried to make it work on Linux? Do I need to compile the wxPyhton using soucre code myself? Could share your experience with me? Many many thanks!

Link to comment
Share on other sites

My next question was going to be about the Python version since I remembered that Ubuntu has used 2.6 for a while. I'm pretty sure that is why you are having trouble. Since your system has 2.6, Houdini cannot use that version so it will fall back to its own build of 2.5. In your cause you will have to install 2.5 on your system as well as the appropriate versioned wx libraries. Not sure how troublesome it will be since I haven't messed around with using Ubuntu and wx in a while. Ideally though, if your system and Houdini were using the same version of Python, then any modules available through the system would be available to Houdini. That's the beauty of using linux with Houdini. I was able to successfully and pretty easily create GUIs using wxPython and PyQT about 3 years ago, back when Houdini 9.0 was still in alpha stages.

What I was also curious about was the fact that you are trying to import wx modules from $HH/scripts/python. Did you copy those there manually?.

Link to comment
Share on other sites

My next question was going to be about the Python version since I remembered that Ubuntu has used 2.6 for a while. I'm pretty sure that is why you are having trouble. Since your system has 2.6, Houdini cannot use that version so it will fall back to its own build of 2.5. In your cause you will have to install 2.5 on your system as well as the appropriate versioned wx libraries. Not sure how troublesome it will be since I haven't messed around with using Ubuntu and wx in a while. Ideally though, if your system and Houdini were using the same version of Python, then any modules available through the system would be available to Houdini. That's the beauty of using linux with Houdini. I was able to successfully and pretty easily create GUIs using wxPython and PyQT about 3 years ago, back when Houdini 9.0 was still in alpha stages.

What I was also curious about was the fact that you are trying to import wx modules from $HH/scripts/python. Did you copy those there manually?.

Many thanks graham,

That's exactly the problem. Seems I am just being stupid. I point the python 2.5 in houdini to grap the wx module in python 2.6... Since Ubuntu 9.04 has both python 2.5 and 2.6 pre installed, when install wx, it will install for both 2.5 and 2.6, I just repoint Houdini python 2.5 to grap the wx module located in python 2.5 directory..then everything works fine! Again, thank you graham!

Edited by rGarfield
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...