1

アプリケーションにdjango歩哨をインストールしようとしていますが、インストール時に以下のエラーが発生しました:-

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 に答える