Mac problems

Tech support and suggestions forum. If you only have a basic question on how to get started, please use the "newbies" forum in the community section.

Moderator: joepal

Mac problems

Postby martha_ezv » Fri Jul 03, 2009 6:01 pm

Hello

I am working whit the “mh_as_module_example” that you put in the MH forum, but when I try to run the test.py example, python show me this error:

Traceback (most recent call last):
File "/Users/mzavala/Documents/workspace/Python/mhGoogle/src/test/test.py", line 43, in <module>
scene.update()
File "/Users/mzavala/Documents/workspace/Python/mhGoogle/src/test/module3d.py", line 1050, in update
mh.init3DScene(nObjs)
NameError: global name 'mh' is not defined


:idea: I think that this error is maybe by my computer, because I am working in Mac OsX version 10.5.7 and you document mh.pyd is for windows.

You have some example to run in mac?? Or maybe you can give me some information about how can I run it in Mac
martha_ezv
 
Posts: 7
Joined: Thu Jul 02, 2009 9:50 pm

Re: Mac problems

Postby hdusel » Thu Jul 09, 2009 8:12 am

martha_ezv wrote:Hello

I am working whit the “mh_as_module_example” that you put in the MH forum, but when I try to run the test.py example, python show me this error:

Traceback (most recent call last):
File "/Users/mzavala/Documents/workspace/Python/mhGoogle/src/test/test.py", line 43, in <module>
scene.update()
File "/Users/mzavala/Documents/workspace/Python/mhGoogle/src/test/module3d.py", line 1050, in update
mh.init3DScene(nObjs)
NameError: global name 'mh' is not defined


:idea: I think that this error is maybe by my computer, because I am working in Mac OsX version 10.5.7 and you document mh.pyd is for windows.

You have some example to run in mac?? Or maybe you can give me some information about how can I run it in Mac


Hi,

you're right. mh.pyd is compiled for Windows and thus it will not run on Mac OS-X.
So I have build a special version of mh.pyd - which has to be named mh.so - for OS-X.

However to run this you will need to set a Environment Variable, because otherwise mh.pyd will not find the SDL frameworks.

Well I have build an archive which contains the module for OS-X and a script which sets this environment either.

So pls. do:

  • Unpack the archive.
  • Enter the unpacked directory by typing
    Code: Select all
    cd mh_as_module_example_osx
  • Set the environment variable as told above. You have to call this just once per Shell Session! So type
    Code: Select all
    source prepare_mh_module.sh
  • Now you may call the python script which will then use mh.so. For example
    Code: Select all
    python test.py
Attachments
mh_as_module_example_osx.zip
MakeHuman as a Module - build for Mac OS X
(1.32 MiB) Downloaded 331 times
hdusel
 
Posts: 43
Joined: Sun Feb 17, 2008 8:26 pm
Location: Munich, Germany

Re: Mac problems

Postby martha_ezv » Mon Jul 13, 2009 5:18 pm

Thank you very much, ;) I will prove it. Thanks again and have a very nice day :lol:
martha_ezv
 
Posts: 7
Joined: Thu Jul 02, 2009 9:50 pm


Return to Bugs, problems and feature requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron