Import Math error

If this has been asked many times I apologize. I searched the forums and found similar problems but nothing really close enough to help.

I’m on OS/X 10.2 and I have Blender 2.33a installed. I wish to use the sqrt function but when I try
import math

I get the following

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
File “myblendermap.py.002”, line 8, in ?
ImportError: Failure linking new module: : dyld: ./Blender.app/Contents/MacOS/blender Undefined symbols:
_PyArg_ParseTuple
_PyDict_SetItemString
_PyErr_SetFromErrno
_PyErr_SetString
_PyExc_OverflowError
_PyExc_ValueError
_PyFloat_FromDouble
_PyLong_Type
_PyModule_GetDict
_PyType_IsSubtype
_Py_BuildValue
_Py_InitModule4
__PyLong_AsScaledDouble

I can import sys and copy just fine but not math. All I need is the sqrt function. Any help would be appreciated. I do have the python path environment path set in the environment.plist file as

/usr/lib/python2.2:/usr/lib/python2.2/plat-darwin:/usr/lib/python2.2/lib-tk:/usr/lib/python2.2/lib-dynload:/usr/lib/python2.2/site-packages:/Users/joesulewski/Blender/Python_Torque

The interesting thing is if I open the python idle I can type import math and math.sqrt(100) and have it return 10. So why wouldn’t this work in Blender? I’m new to python so please be kind.

Thanks,
Joe

check what version blender is using. check the contents of the include path when you run python from the terminal:

import sys
print sys.path

After I start blender this is what prints to the terminal window

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]

When I run my script this is what I get

Sys path is
[’/usr/lib/python2.2’, ‘/usr/lib/python2.2/plat-darwin’, ‘/usr/lib/python2.2/lib-tk’, ‘/usr/lib/python2.2/lib-dynload’, ‘/usr/lib/python2.2/site-packages’, ‘/Users/joesulewski/Blender/Python_Torque’, ‘/sw/lib/python23.zip’, ‘/sw/lib/python2.3/’, ‘/sw/lib/python2.3/plat-darwin’, ‘/sw/lib/python2.3/plat-mac’, ‘/sw/lib/python2.3/plat-mac/lib-scriptpackages’, ‘/sw/lib/python2.3/lib-tk’, ‘/sw/lib/lib-dynload’, ‘/Applications/blender 2.33a/./Blender.app/Contents/MacOS’, ‘/sw/lib/python2.3/site-packages’, ‘/sw/lib/site-python’, ‘/Applications/blender 2.33a/./Blender.app/Contents/MacOS/.blender/scripts’]

Does this help at all?