zaw*_*wdd 14 python linux twisted
我想在Python中使用Twisted,但是当我安装时,出现此错误,如何处理它?
....
running build_ext
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c conftest.c -o conftest.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c conftest.c -o conftest.o
building 'twisted.runner.portmap' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c twisted/runner/portmap.c -o build/temp.linux-i686-2.7/twisted/runner/portmap.o
twisted/runner/portmap.c:10:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)
jdi*_*jdi 38
您缺少构建需要编译扩展的包所需的python开发头.
如果您在OSX上构建,请确保安装预构建的mac python包或者如果从源代码构建python,请在配置时使用framework标志.并确保安装了XCODE,以便拥有编译器.
如果您在Linux上构建,则可能需要安装python devel头文件.例如在Ubuntu上你需要: apt-get install build-essential python-dev.一旦你有了python开发头文件,在使用那个python解释器构建时,twisted应该能够找到它们.
| 归档时间: |
|
| 查看次数: |
9747 次 |
| 最近记录: |