python - Cython 编译突然开始失败

标签 python ubuntu cython

我有一个 cythonized 应用程序,直到昨天它还在编译和运行完全正常。
现在,突然,当尝试编译(在 DigitalOcean 上运行的 Ubuntu 20 服务器)时,我得到了这个:

creating build/temp.linux-x86_64-3.8
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/var/www/anagami_console/anagami/anagamienv/include -I/usr/include/python3.8 -c event.c -o build/temp.linux-x86_64-3.8/event.o
x86_64-linux-gnu-gcc: fatal error: Killed signal terminated program cc1
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
相同的代码使用 python 3.9 在我的 Windows 桌面上编译和运行完美。
我得到的错误信息不是特别丰富,所以我真的不知道在哪里看

最佳答案

修复它的方法是删除每个 .c 和 .pyd 文件并重新编译。我仍然不确定是什么导致了原始错误 - 但删除 + 进行全新的重新编译修复了它

关于python - Cython 编译突然开始失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69802421/

相关文章:

python - pydev - ide 提示模块导入自身

node.js - ubuntu 14.04 上的 ssl 证书问题

c++ - 使用 C++ 时,如果没有 gil 编译错误,则不允许调用需要 gil 的函数

python - Cython的cpython.datetime.datetime_new导致段错误

python - pandas.DataFrame 中的 NaN 不打印到 Excel

java - Java 和 Python 之间的套接字连接 - struct.unpack 错误

python - 与正在运行的 ubuntu python 服务器进程通信

python - 如何在 Cython 中使用内联函数

python - 切片数组时假设后续维度为零

python - 如何在 Python3 中解压缩使用 PKZIP 以外的算法加密的文件?