I want a python physics engine that works on mac and makes it easy to simulate physics. I have VPython and it works fine, but it is not quite what I want. VPython just shows visual elements and all the physics is in formulas. I looked at the documentation for PyODE and it looked like more what I want. It allowed you to add forces to masses and have worlds and things like that. When I tried to install PyODE (I am using a Mac), it didn’t work. One reason was that I didn’t have pyrex (I do have Cython, so maybe there is some way to have it use that?), but the other was that I didn’t have ode installed. I looked and realized that PyODE is dependent on ode. I tried to install ode but that didn’t work. Is there some documentation or binary or something that makes it easy to install PyODE on a mac? Or is there a similar module?
Edit:
This is the error I received when trying to install PyODE:
sh: ode-config: command not found
sh: ode-config: command not found
WARNING: <ode/ode.h> not found. You may have to adjust INC_DIRS.
INFO: Creating ode_trimesh.c
pyrexc -o ode_trimesh.c -I. -Isrc src/ode.pyx
sh: pyrexc: command not found
ERROR: An error occured while generating the C source file.
I got this error because pyrex and ode weren’t installed. There was no documentation for installing ode on mac so there were no error messages for what I tried to do but the errors stayed the same for PyODE so ode wasn’t installed.
You can easily install ODE on your Mac with
darwinports— instructions here. You can easily list PyODE versions for darwinports — then pick the right one for your chosen Python version — by entering PyODE on the “search in darwinports” text box, and similarly for Pyrex (Cython is not 100% compatible with Pyrex, so it may not be worth the bother to tweak things for it… even though Cython tends to be better;-). Note that it will be easiest if you also install a Python version with darwinports rather than sticking to the one Apple supplies (the darwinports version will be more up-to-date and will have plenty more extensions available that might be more work to install on the Apple-supplied “system” Python).