Python third-party package source code compilation Error

Source: Internet
Author: User

The following error occurs when compiling jpype Python setup. py build:

4-2.4/src/native/Python/jpype_javaarray.oin file encoded from src/native/Python/jpype_javaarray.cpp: 18: src/native/Python/include/jpype_python.h: 24: 20: Error: python. h: No such file or directorysrc/native/Python/include/jpype_python.h: 28: 20: Error: pyport. h: No such file or directoryin file encoded ded from src/native/Python/include/jpype_python.h: 109, from src/native/Python/jpype_javaarray.cpp: 18: src/native/Python/include/py_monitor.h: 20: 20: Error: object. h: No such file or directorysrc/native/Python/include/pythonenv. h: 40: Error: iso c ++ forbids declaration of 'pyobject' with no typesrc/native/Python/include/pythonenv. h: 40: Error: Expected '; 'before' * 'tokensrc/native/Python/include/pythonenv. h: 43: Error: iso c ++ forbids declaration of 'pyobject' with no typesrc/native/Python/include/pythonenv. h: 43: Error: Expected '; 'before' * 'tokensrc/native/Python/include/pythonenv. h: 44: Error: iso c ++ forbids declaration of 'pyobject' with no typesrc/native/Python/include/pythonenv. h: 44: Error: Expected '; 'before' * 'tokensrc/native/Python/include/pythonenv. h: 61: Error: 'pyobject' has not been declaredsrc/native/Python/include/pythonenv. h: 62: Error: 'pyobject' has not been declaredsrc/native/Python/include/pythonenv. h: 62: Error: 'pyobject' has not been declaredsrc/native/Python/include/pythonenv. h: In static member function 'static void jpyerr: Check () ': src/native/Python/include/pythonenv. h: 65: Error: 'pyobject' was not declared in this scopesrc/native/Python/include/pythonenv. h: 65: Error: '_ Ex' was not declared in this scopesrc/native/Python/include/pythonenv. h: 65: Error: 'pyerr _ occurred' was not declared in this scopesrc/native/Python/include/pythonenv. h: at global scope:

It took only half a day to find the reason. It turns out that python is not installed.

Yum install python-devel-2.4.3-44.el5

Done.

Note: When compiling jpype, you also need to set the java_home environment variable.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.