How to install panda 3d in mac os x

Hi to all :smiley:
i have a problem;
I have installed correctly panda 3d on mac os x leopard.
Now i have to install python 2.5 for compile cpp program.

I have downloaded different Python 2.5 dmg but when i compile my panda 3d application with Python path i have some errors.

how install python for panda correctly?
thanks.
:smiley:

command that i use to compile :

/usr/bin/g++ -c main.cpp -o main.o -fPIC -O2 -I /Applications/MacPython\ 2.5/ -I /Developer/Panda3D/include/

compile result :

In file included from /Developer/Panda3D/include/pandabase.h:22,
from /Developer/Panda3D/include/pandaFramework.h:18,
from main.cpp:1:
/Developer/Panda3D/include/dtoolbase.h:98:22: error: pyconfig.h: No such file or directory
In file included from /Developer/Panda3D/include/cycleData.h:19,
from /Developer/Panda3D/include/pandaNode.h:20,
from /Developer/Panda3D/include/nodePath.h:20,
from /Developer/Panda3D/include/windowFramework.h:19,
from /Developer/Panda3D/include/pandaFramework.h:20,
from main.cpp:1:
/Developer/Panda3D/include/typeHandle.h:69:20: error: Python.h: No such file or directory
In file included from /Developer/Panda3D/include/threadImpl.h:28,
from /Developer/Panda3D/include/thread.h:23,
from /Developer/Panda3D/include/pipelineCyclerTrivialImpl.h:22,
from /Developer/Panda3D/include/pipelineCyclerBase.h:39,
from /Developer/Panda3D/include/pipelineCycler.h:19,
from /Developer/Panda3D/include/cycleDataReader.h:21,
from /Developer/Panda3D/include/pandaNode.h:21,
from /Developer/Panda3D/include/nodePath.h:20,
from /Developer/Panda3D/include/windowFramework.h:19,
from /Developer/Panda3D/include/pandaFramework.h:20,
from main.cpp:1:
/Developer/Panda3D/include/threadSimpleImpl.h:31:20: error: Python.h: No such file or directory
/Developer/Panda3D/include/typeHandle.h:106: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/typeHandle.h:106: error: expected ‘;’ before ‘’ token
/Developer/Panda3D/include/filename.h:70: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/filename.h:70: error: expected ‘;’ before ‘
’ token
/Developer/Panda3D/include/threadSimpleImpl.h:135: error: ISO C++ forbids declaration of ‘PyThreadState’ with no type
/Developer/Panda3D/include/threadSimpleImpl.h:135: error: expected ‘;’ before ‘’ token
/Developer/Panda3D/include/thread.h:99: error: ‘PyObject’ has not been declared
/Developer/Panda3D/include/thread.h:100: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/thread.h:100: error: expected ‘;’ before ‘
’ token
/Developer/Panda3D/include/thread.h:121: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/thread.h:121: error: expected ‘;’ before ‘’ token
/Developer/Panda3D/include/thread.h:141: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/thread.h:141: error: expected ‘;’ before ‘
’ token
/Developer/Panda3D/include/typedWritable.h:64: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/typedWritable.h:64: error: expected ‘;’ before ‘’ token
/Developer/Panda3D/include/typedWritable.h:75: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/typedWritable.h:75: error: expected ‘;’ before ‘
’ token
/Developer/Panda3D/include/typedWritable.h:114: error: expected constructor, destructor, or type conversion before ‘’ token
/Developer/Panda3D/include/lvecBase2_src.h:43: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/lvecBase2_src.h:43: error: expected ‘;’ before ‘
’ token
/Developer/Panda3D/include/lvecBase2_src.h:43: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/lvecBase2_src.h:43: error: expected ‘;’ before ‘’ token
/Developer/Panda3D/include/lvecBase3_src.h:41: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/lvecBase3_src.h:41: error: expected ‘;’ before ‘
’ token
/Developer/Panda3D/include/lvecBase3_src.h:41: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/lvecBase3_src.h:41: error: expected ‘;’ before ‘’ token
/Developer/Panda3D/include/lvecBase4_src.h:42: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/lvecBase4_src.h:42: error: expected ‘;’ before ‘
’ token
/Developer/Panda3D/include/lvecBase4_src.h:42: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/lvecBase4_src.h:42: error: expected ‘;’ before ‘’ token
/Developer/Panda3D/include/lmatrix3_src.h:69: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/lmatrix3_src.h:69: error: expected ‘;’ before ‘
’ token
/Developer/Panda3D/include/lmatrix4_src.h:64: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/lmatrix4_src.h:64: error: expected ‘;’ before ‘’ token
/Developer/Panda3D/include/lmatrix3_src.h:69: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/lmatrix3_src.h:69: error: expected ‘;’ before ‘
’ token
/Developer/Panda3D/include/lmatrix4_src.h:64: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/lmatrix4_src.h:64: error: expected ‘;’ before ‘’ token
/Developer/Panda3D/include/transformState.h:193: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/transformState.h:193: error: expected ‘;’ before ‘
’ token
/Developer/Panda3D/include/transformState.h:194: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/transformState.h:194: error: expected ‘;’ before ‘’ token
/Developer/Panda3D/include/transformState.h:208: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/transformState.h:208: error: expected ‘;’ before ‘
’ token
/Developer/Panda3D/include/renderState.h:130: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/renderState.h:130: error: expected ‘;’ before ‘’ token
/Developer/Panda3D/include/renderState.h:131: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/renderState.h:131: error: expected ‘;’ before ‘
’ token
/Developer/Panda3D/include/renderState.h:147: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/renderState.h:147: error: expected ‘;’ before ‘’ token
/Developer/Panda3D/include/pandaNode.h:123: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/pandaNode.h:123: error: expected ‘;’ before ‘
’ token
/Developer/Panda3D/include/pandaNode.h:206: error: ‘PyObject’ has not been declared
/Developer/Panda3D/include/pandaNode.h:207: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/pandaNode.h:207: error: expected ‘;’ before ‘’ token
/Developer/Panda3D/include/pandaNode.h:503: error: ‘PyObject’ was not declared in this scope
/Developer/Panda3D/include/pandaNode.h:503: error: template argument 2 is invalid
/Developer/Panda3D/include/pandaNode.I: In member function ‘bool PandaNode::has_tags() const’:
/Developer/Panda3D/include/pandaNode.I:475: error: request for member ‘empty’ in ‘cdata. CycleDataReader::operator-> with CycleDataType = PandaNode::CData->PandaNode::CData::_python_tag_data’, which is of non-class type ‘const int’
/Developer/Panda3D/include/nodePath.h: At global scope:
/Developer/Panda3D/include/nodePath.h:173: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/nodePath.h:173: error: expected ‘;’ before ‘
’ token
/Developer/Panda3D/include/nodePath.h:174: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/nodePath.h:174: error: expected ‘;’ before ‘’ token
/Developer/Panda3D/include/nodePath.h:854: error: ‘PyObject’ has not been declared
/Developer/Panda3D/include/nodePath.h:855: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/nodePath.h:855: error: ‘PyObject’ declared as an ‘inline’ field
/Developer/Panda3D/include/nodePath.h:855: error: expected ‘;’ before ‘
’ token
/Developer/Panda3D/include/nodePath.h:858: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/nodePath.h:858: error: ‘PyObject’ declared as an ‘inline’ field
/Developer/Panda3D/include/nodePath.h:858: error: expected ‘;’ before ‘’ token
/Developer/Panda3D/include/nodePath.I:2261: error: ‘PyObject’ has not been declared
/Developer/Panda3D/include/nodePath.I:2276: error: expected initializer before ‘
’ token
/Developer/Panda3D/include/nodePath.I:2334: error: expected initializer before ‘’ token
/Developer/Panda3D/include/asyncTask.h:108: error: ‘PyObject’ has not been declared
/Developer/Panda3D/include/asyncTask.h:109: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/asyncTask.h:109: error: ‘PyObject’ declared as an ‘inline’ field
/Developer/Panda3D/include/asyncTask.h:109: error: expected ‘;’ before ‘
’ token
/Developer/Panda3D/include/asyncTask.h:157: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/asyncTask.h:157: error: expected ‘;’ before ‘’ token
/Developer/Panda3D/include/asyncTask.I:247: error: variable or field ‘set_python_object’ declared void
/Developer/Panda3D/include/asyncTask.I:247: error: ‘AsyncTask::set_python_object’ declared as an ‘inline’ variable
/Developer/Panda3D/include/asyncTask.I:247: error: ‘int AsyncTask::set_python_object’ is not a static member of ‘class AsyncTask’
/Developer/Panda3D/include/asyncTask.I:247: error: ‘PyObject’ was not declared in this scope
/Developer/Panda3D/include/asyncTask.I:247: error: ‘python_object’ was not declared in this scope
/Developer/Panda3D/include/asyncTask.I:247: error: expected ‘,’ or ‘;’ before ‘{’ token
/Developer/Panda3D/include/asyncTask.I:262: error: expected initializer before ‘
’ token
/Developer/Panda3D/include/graphicsStateGuardian.h:176: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/Developer/Panda3D/include/graphicsStateGuardian.h:176: error: expected ‘;’ before ‘*’ token

Just use “-framework Python” instead of specifying an include path to your custom Python installation.

i obtain same error :frowning:

Hum, I thought that that would automatically set the include path. Nevertheless, you can just use this then:

-I/System/Library/Frameworks/Python.framework/Versions/2.5/Headers/

oooook :smiley: now it works great :wink: :wink: thank you a lot for your quick help :wink:
thannnnnnnnnkkkyou :smiley:

You have given a great information… its really helpful… thanks for sharing…