python - 如何使用 pypy 1.4.1 安装 twisted 10.2.0?

标签 python twisted pypy

我无法将 twisted 10.2.0 安装到我的 ubuntu 机器上。下载扭曲源后,我发出命令:pypy setup.py install。之后我收到错误:

building 'twisted.runner.portmap' extension
creating build/temp.linux-x86_64-2.5
creating build/temp.linux-x86_64-2.5/twisted
creating build/temp.linux-x86_64-2.5/twisted/runner
cc -I/builds/pypy-1.4.1-linux64/include -c twisted/runner/portmap.c -o build/temp.linux-x86_64-2.5/twisted/runner/portmap.o
cc -shared build/temp.linux-x86_64-2.5/twisted/runner/portmap.o -o build/lib.linux-x86_64-2.5/twisted/runner/portmap.pypy-14.so
/usr/bin/ld.bfd.real: build/temp.linux-x86_64-2.5/twisted/runner/portmap.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
build/temp.linux-x86_64-2.5/twisted/runner/portmap.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
error: command 'cc' failed with exit status 1

那么,我该如何解决呢?谢谢。

最佳答案

这是扭曲构建中的一个“错误”。它可能是也可能不是错误——twisted 不认为它的 C 扩展是可选的,尽管它们在大多数情况下都不是必需的。如果您只是将 PYTHONPATH 指向它所在的位置,但没有那些 C 扩展,Twisted 仍然可以工作。

关于python - 如何使用 pypy 1.4.1 安装 twisted 10.2.0?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5126039/

相关文章:

python - 简单的 boolean 不等式运算符错误

python - Keras:如何为验证集随机抽样?

javascript - Django 和 JavaScript fetch() : CORS policy: No 'Access-Control-Allow-Origin' header is present

Python:如何更改此代码,以便每 60 秒执行一次 doWork()?

python - PyPy 使用什么样的 JIT 编译器?

compiler-construction - 为什么 JIT 代码比编​​译或解释的代码消耗更多的内存?

python - 使用循环分支 Apache Beam 管道

python - 我如何设计一个扭曲的工厂来处理断开连接?

python - 处理 Twisted 中的失败

python - PyPy 的统计分析器