Installing on Ubunutu 7.10

OK, here’s what I can tell you.

Panda3D uses the function ‘PyUnicode_AsWideChar’. This function is supposed to be supplied by the python library.

In my copy of ubuntu gutsy, there’s a configuration file called “/usr/include/python2.5/pyconfig.h” which contains this line:

#define Py_UNICODE_SIZE 4

This, in turn, causes Py_UNICODE_WIDE to be defined. That, in turn, causes this to happen:

#ifndef Py_UNICODE_WIDE
#define PyUnicode_AsWideChar PyUnicodeUCS2_AsWideChar
#else
#define PyUnicode_AsWideChar PyUnicodeUCS4_AsWideChar
#endif

Since the ubuntu gutsy Panda3D distribution was compiled using this copy of python, when it calls PyUnicode_AsWideChar, it’s really calling PyUnicodeUCS4_AsWideChar.

My theory is this: your copy of python was compiled with Py_UNICODE_SIZE 2. You can probably check this by looking in your copy of pyconfig.h. If that’s the case, then that would explain why your copy of python isn’t providing this function.

So how did this happen? My guess is that your sources.list contains a non-ubuntu source, and that as a result, you’ve accidentally installed a copy of python other than the standard ubuntu python.

  • Josh