0

我希望这是正确的地方,而不是 Stack Overflow 等的 Unix 用户;

如何在 Debian Squeeze 上安装 Python 包关联?

我已经下载了 tar,解压,然后运行了下面的命令,但是失败了;我以前从来没有安装过这样的python模块,所以我迷路了:)

root@host:~/affinity-0.1.0# python setup.py install
running install
install_dir /usr/local/lib/python2.6/dist-packages/
Checking .pth file support in /usr/local/lib/python2.6/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.6/dist-packages/ appears to support .pth files
running bdist_egg
running egg_info
writing affinity.egg-info/PKG-INFO
writing top-level names to affinity.egg-info/top_level.txt
writing dependency_links to affinity.egg-info/dependency_links.txt
reading manifest file 'affinity.egg-info/SOURCES.txt'
writing manifest file 'affinity.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-2.6
creating build/lib.linux-x86_64-2.6/affinity
copying affinity/__init__.py -> build/lib.linux-x86_64-2.6/affinity
running build_ext
building 'affinity._affinity' extension
creating build/temp.linux-x86_64-2.6
creating build/temp.linux-x86_64-2.6/affinity
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c affinity/_affinity.c -o build/temp.linux-x86_64-2.6/affinity/_affinity.o
affinity/_affinity.c:14:20: error: Python.h: No such file or directory
affinity/_affinity.c:17: error: expected ‘)’ before string constant
affinity/_affinity.c:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
affinity/_affinity.c:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
affinity/_affinity.c:63: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘methods’
affinity/_affinity.c:80: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘init_affinity’
error: command 'gcc' failed with exit status 1
4

1 回答 1

0

好的,修好了。我现在看到我刚刚安装了包python,而不是额外python-dev的,这是头文件所必需的,如我在此行的问题输出中所示:

affinity/_affinity.c:14:20: error: Python.h: No such file or directory
于 2012-08-31T10:13:30.240 回答