1

我正在尝试为我的应用程序安装 django sentry,但在安装时出现以下错误:-

In file included from Modules/_billiard/multiprocessing.c:9:
Modules/_billiard/multiprocessing.h:12:20: error: Python.h: No such file or directory
Modules/_billiard/multiprocessing.h:13:26: error: structmember.h: No such file or directory
Modules/_billiard/multiprocessing.h:14:22: error: pythread.h: No such file or directory
In file included from Modules/_billiard/multiprocessing.c:9:
Modules/_billiard/multiprocessing.h:127: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
Modules/_billiard/multiprocessing.h:133: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
Modules/_billiard/multiprocessing.h:134: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
Modules/_billiard/multiprocessing.h:135: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
Modules/_billiard/multiprocessing.h:136: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
Modules/_billiard/multiprocessing.h:137: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘BilliardSemLockType’
Modules/_billiard/multiprocessing.h:138: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘BilliardConnectionType’
Modules/_billiard/multiprocessing.h:139: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘BilliardPipeConnectionType’
Modules/_billiard/multiprocessing.h:171: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
Modules/_billiard/multiprocessing.c:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
Modules/_billiard/multiprocessing.c:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
Modules/_billiard/multiprocessing.c:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
Modules/_billiard/multiprocessing.c:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
Modules/_billiard/multiprocessing.c:101: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
Modules/_billiard/multiprocessing.c:136: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
Modules/_billiard/multiprocessing.c:181: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
Modules/_billiard/multiprocessing.c:199: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Billiard_module_methods’
Modules/_billiard/multiprocessing.c:222: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘init_billiard’
error: Setup script exited with error: command 'gcc' failed with exit status 1

Django 版本是 1.2.5,python 是 2.6。我已经尝试了所有方法(easy_install,pip,下载和安装),但仍然是同样的错误。

请任何人就此提出建议。

4

1 回答 1

2

问题是 GCC 找不到 Python 头文件。

如果您使用由某种包系统安装的 Python,请尝试安装 Python 的开发者包。它应该被命名为 python-dev 或类似的东西。

于 2012-09-04T09:18:51.320 回答