Reputation: 41
I am trying to deploy a Django app I've made onto Heroku. After finally figuring out how to push it to git, I tried doing
$ git push heroku master
But then it fails to push because it can't build the 'twisted_iocpsupport.iocpsupport' extension.
The error message I get is as follows.
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
How do I fix this? I tried removing Twisted and twisted_iocpsupport from my requirements.txt file just to see if it would push, but that didn't work.
Upvotes: 3
Views: 1896
Reputation: 48335
twisted_iocpsupport
is a platform-specific module for Windows only. You won't be able to build or install it on Heroku's Linux-based platform.
Remove whatever declaration you have that twisted_iocpsupport
is a dependency of your project and this should go away.
Upvotes: 7