gpt4 book ai didi

python - 来自 setproctitle 的 easy_install 的 gcc 错误

转载 作者:太空狗 更新时间:2023-10-30 02:05:55 26 4
gpt4 key购买 nike

我正在尝试安装 setproctitle。我试过只下载包并使用 setup.py 进行安装,我试过 easy_install。这两种方法都不起作用,都提出了类似的方法:

:~$ sudo easy_install setproctitle
Searching for setproctitle
Reading http://pypi.python.org/simple/setproctitle/
Reading http://code.google.com/p/py-setproctitle/
Best match: setproctitle 1.1.2
Downloading http://pypi.python.org/packages/source/s/setproctitle/setproctitle-1.1.2.zip#md5=52f99a78cbdd1b0036bf41b4512442e7
Processing setproctitle-1.1.2.zip
Running setproctitle-1.1.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-P9lA8V/setproctitle-1.1.2/egg-dist-tmp-T0jtZK
In file included from src/spt.h:15,
from src/setproctitle.c:14:
src/spt_python.h:14:20: error: Python.h: No such file or directory
src/setproctitle.c:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/setproctitle.c:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/setproctitle.c:52: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/setproctitle.c:68: error: array type has incomplete element type
src/setproctitle.c:69: error: ‘PyCFunction’ undeclared here (not in a function)
src/setproctitle.c:69: error: expected ‘}’ before ‘spt_setproctitle’
src/setproctitle.c:70: error: expected ‘}’ before ‘spt_getproctitle’
src/setproctitle.c:99: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘initsetproctitle’
error: Setup script exited with error: command 'gcc' failed with exit status 1

我不太确定发生了什么。我以前很容易安装它。我正在运行 Ubuntu 10.04 的全新安装。任何帮助将不胜感激。

最佳答案

安装 python-dev包。

关于python - 来自 setproctitle 的 easy_install 的 gcc 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7800574/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com