error: Python.h: No such file or directory while trying to install cando

Asked by Erwin Olario

Following the setup instructions from here: http://book.schooltool.org/htmlhelp/cando.html, I am trying to install CanDo in my 64-bit Jaunty machine.

However, after executing
$ sudo make ubuntu-environment

I get the following errors:

-------------------------------------
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:17:20: error: Python.h: No such file or directory
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:47: error: expected specifier-qualifier-list before ‘PyUnicodeObject’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:53: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘MessageType’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:55: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘*’ token
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:114:26: error: structmember.h: No such file or directory
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:116: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘Message_members’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:124: error: expected declaration specifiers or ‘...’ before ‘visitproc’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c: In function ‘Message_traverse’:
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:126: error: ‘Message’ has no member named ‘domain’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:126: warning: implicit declaration of function ‘visit’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:126: error: ‘Message’ has no member named ‘domain’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:127: error: ‘Message’ has no member named ‘default_’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:127: error: ‘Message’ has no member named ‘default_’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:128: error: ‘Message’ has no member named ‘mapping’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:128: error: ‘Message’ has no member named ‘mapping’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c: In function ‘Message_clear’:
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:135: error: ‘Message’ has no member named ‘domain’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:135: error: ‘PyObject’ undeclared (first use in this function)
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:135: error: (Each undeclared identifier is reported only once
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:135: error: for each function it appears in.)
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:135: error: ‘tmp’ undeclared (first use in this function)
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:135: error: ‘Message’ has no member named ‘domain’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:135: error: ‘Message’ has no member named ‘domain’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:135: error: ‘NULL’ undeclared (first use in this function)
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:135: warning: implicit declaration of function ‘Py_DECREF’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:136: error: ‘Message’ has no member named ‘default_’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:136: error: ‘Message’ has no member named ‘default_’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:136: error: ‘Message’ has no member named ‘default_’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:137: error: ‘Message’ has no member named ‘mapping’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:137: error: ‘Message’ has no member named ‘mapping’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:137: error: ‘Message’ has no member named ‘mapping’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c: In function ‘Message_dealloc’:
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:145: error: ‘Message’ has no member named ‘base’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:145: error: ‘PyObject’ undeclared (first use in this function)
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:145: error: expected expression before ‘)’ token
src/zope/i18nmessageid/_zope_i18nmessageid_message.c: At top level:
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:148: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘*’ token
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:164: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘Message_methods’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:180: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘PyTypeObject’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:234: error: array type has incomplete element type
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:235: error: ‘NULL’ undeclared here (not in a function)
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:235: error: ‘PyCFunction’ undeclared here (not in a function)
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:235: error: expected ‘}’ before ‘NULL’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c: In function ‘init_zope_i18nmessageid_message’:
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:249: error: ‘PyObject’ undeclared (first use in this function)
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:249: error: ‘m’ undeclared (first use in this function)
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:251: error: ‘MessageType’ undeclared (first use in this function)
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:251: error: ‘PyUnicode_Type’ undeclared (first use in this function)
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:252: warning: implicit declaration of function ‘PyType_Ready’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:256: warning: implicit declaration of function ‘Py_InitModule3’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:264: warning: implicit declaration of function ‘PyModule_AddObject’
src/zope/i18nmessageid/_zope_i18nmessageid_message.c:264: error: expected expression before ‘)’ token
error: Setup script exited with error: command 'gcc' failed with exit status 1
An error occured when trying to install zope.i18nmessageid 3.4.3.Look above this message for any errors thatwere output by easy_install.
While:
  Installing cando.
  Getting distribution for 'zope.i18nmessageid==3.4.3'.
Error: Couldn't install: zope.i18nmessageid 3.4.3
make[1]: *** [buildout] Error 1
make[1]: Leaving directory `/home/erwin/cando'
make: *** [build] Error 2

----------------------

Did I miss anything?

Question information

Language:
English Edit question
Status:
Solved
For:
CanDo Edit question
Assignee:
No assignee Edit question
Solved by:
Filip Sufitchi
Solved:
Last query:
Last reply:
Revision history for this message
Jason Straw (jasonstraw) said :
#1

are you sure make ubuntu-environment ran correctly?

It looks like python-all-dev didn't get installed properly...

try sudo make ubuntu-environment once more and make sure to say yes to all the questions if that fails do sudo apt-get install python-all-dev and let me know which worked.

Revision history for this message
Erwin Olario (gowin) said :
#2

Also, please note that the error was generated after make, not make ubuntu-environment. My mistake.

I had no problems with the initial make ubuntu-environment but I did it again, and results were as follows:

Reading package lists... Done
Building dependency tree
Reading state information... Done
subversion is already the newest version.
build-essential is already the newest version.
python-all is already the newest version.
python-all-dev is already the newest version.
libc6-dev is already the newest version.
libicu-dev is already the newest version.
libxml2-dev is already the newest version.
libxslt1-dev is already the newest version.
zlib1g-dev is already the newest version.
zlib1g-dev set to manually installed.
python-pyrex is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Installation Complete: Next... Run 'make'.

Results of attempt to re-install of python-all-dev:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done

Tried make again. No joy. Got the same errors posted originally.

Revision history for this message
Filip Sufitchi (fsufitch) said :
#3

I had the same problem when first installing SchoolTool on Jaunty. python-all-dev does not include python2.4-dev anymore. You need to install python2.4-dev and python2.4 specifically for this to work. This is because python2.4 is apparently not supported anymore, in favor of 2.5 and 2.6, which are now contained in the python-all packages.

Hope this helps.

Revision history for this message
Best Filip Sufitchi (fsufitch) said :
#4

I had the same problem when first installing SchoolTool on Jaunty.
python-all-dev does not include python2.4-dev anymore. You need to
install python2.4-dev and python2.4 specifically for this to work. This
is because python2.4 is apparently not supported anymore, in favor of
2.5 and 2.6, which are now contained in the python-all packages.

Hope this helps.

Filip Sufitchi
http://www.sufitchi.com/filip

On Sun, 2009-05-03 at 04:22 +0000, Erwin Olario wrote:

> Question #69647 on CanDo changed:
> https://answers.launchpad.net/cando/+question/69647
>
> Status: Needs information => Open
>
> Erwin Olario gave more information on the question:
> Also, please note that the error was generated after make, not make
> ubuntu-environment. My mistake.
>
> I had no problems with the initial make ubuntu-environment but I did it
> again, and results were as follows:
>
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> subversion is already the newest version.
> build-essential is already the newest version.
> python-all is already the newest version.
> python-all-dev is already the newest version.
> libc6-dev is already the newest version.
> libicu-dev is already the newest version.
> libxml2-dev is already the newest version.
> libxslt1-dev is already the newest version.
> zlib1g-dev is already the newest version.
> zlib1g-dev set to manually installed.
> python-pyrex is already the newest version.
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> Installation Complete: Next... Run 'make'.
>
> Results of attempt to re-install of python-all-dev:
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Reading extended state information
> Initializing package states... Done
> Writing extended state information... Done
> No packages will be installed, upgraded, or removed.
> 0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> Need to get 0B of archives. After unpacking 0B will be used.
> Writing extended state information... Done
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Reading extended state information
> Initializing package states... Done
>
> Tried make again. No joy. Got the same errors posted originally.
>

Revision history for this message
Filip Sufitchi (fsufitch) said :
#5

Sorry, double post. Apparently the one via e-mail lagged. I filed a SchoolTool and CanDo bug about this: https://bugs.launchpad.net/cando/+bug/371485

Revision history for this message
Erwin Olario (gowin) said :
#6

Thanks Filip Sufitchi, that solved my question.