【发布时间】:2021-04-22 17:40:58
【问题描述】:
我正在尝试将我制作的 Django 应用程序部署到 Heroku 上。在终于弄清楚如何将其推送到 git 之后,我尝试做
$ git push heroku master
但随后它无法推送,因为它无法构建“twisted_iocpsupport.iocpsupport”扩展。
我得到的错误信息如下。
remote: creating build
remote: creating build/temp.linux-x86_64-3.9
remote: creating build/temp.linux-x86_64-3.9/twisted_iocpsupport
remote: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Itwisted_iocpsupport -I/app/.heroku/python/include/python3.9 -c twisted_iocpsupport/iocpsupport.c -o build/temp.linux-x86_64-3.9/twisted_iocpsupport/iocpsupport.o
remote: twisted_iocpsupport/iocpsupport.c:633:10: fatal error: io.h: No such file or directory
remote: 633 | #include "io.h"
remote: | ^~~~~~
remote: compilation terminated.
remote: error: command '/usr/bin/gcc' failed with exit code 1
remote: ----------------------------------------
remote: ERROR: Failed building wheel for twisted-iocpsupport
remote: Successfully built foil gunicorn Protego PyDispatcher
remote: Failed to build twisted-iocpsupport
remote: ERROR: Could not build wheels for twisted-iocpsupport which use PEP 517 and cannot be installed directly
我该如何解决这个问题?我尝试从我的 requirements.txt 文件中删除 Twisted 和 twisted_iocpsupport 只是为了看看它是否会推送,但这没有用。
【问题讨论】: