Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Could not build wheels for twisted-iocpsupport, which is required to install pyproject.toml-based projects #11891

Closed
PhilMele opened this issue Jul 6, 2023 · 7 comments
Labels

Comments

@PhilMele
Copy link

PhilMele commented Jul 6, 2023

I was pushing some code to Heroku and came across the following error message:

ERROR: Could not build wheels for twisted-iocpsupport, which is required to install pyproject.toml-based projects

Apprently this is due to the use of my requirements.txt file.

I saw somewhere on Stackover it would be good to report this to you. So here is the report :)

Using Django and Heroku.

@PhilMele PhilMele added the bug label Jul 6, 2023
@adiroiban
Copy link
Member

Hi,

Thanks for the report.
Can you provide more steps on how to reproduce this error?

For example, how I can reproduce this error on my Ubuntu 22.04 dev laptop... but any linux or Windows OS is good enough

Thanks

@PhilMele
Copy link
Author

PhilMele commented Jul 7, 2023

Hi there,

Thats problem, I am not sure how I got twisted-iocpsupport on my requirements.txt.

Reading Stack it looks like this is typical when deploying on Heroku. This happened when trying to deploy a websocket.

I am using Windows.

There was a dependency between "Twisted" and "twisted-iocpsupport". I removed "twisted-iocpsupport" from the requirements.txt file and things seem to have work perfectly fine.

@adiroiban
Copy link
Member

Ok.
But just a bit more info could help.

For example which Python version do you use ?
Which CPU architecture - x64 ARM64 ?
Which version on twisted-iocpsupport was attempted to be installed ?

cheers

@glyph
Copy link
Member

glyph commented Jul 7, 2023

When @PhilMele replies with their configuration, we should kick off a build to get some wheels for their (python version/windows version/architecture) matrix so that this just works for them, but we should also make the next version of Twisted just not have this issue at all for more casual users, as stipulated in #11893.

@PhilMele
Copy link
Author

PhilMele commented Jul 8, 2023

hi all, sorry I took a bit of time to reply.

python version - Python 3.10.4
CPU architecture - x64, Processor Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz, 2496 Mhz, 2 Core(s), 4 Logical Processor(s)
twisted-iocpsupport version & twisted - Twisted==22.10.0, twisted-iocpsupport==1.0.3
Using Windows 10

The problem only occurs when deploying on Heroku. It works fine on my laptop.

Does this answer your question? (thank you for the replies by the way!)

Let me know if you want me to test something.

@glyph
Copy link
Member

glyph commented Jul 10, 2023

The problem only occurs when deploying on Heroku. It works fine on my laptop.

Thanks for this info. I think this means the Python we care about is the environment Heroku is running in, which is presumably Linux.

twisted-iocpsupport doesn't work on linux, and it would not make sense to install it there.

So the question is really, how did it get into your requirements.txt that is getting processed on heroku? I do not think that is a problem Twisted can fix :).

@glyph glyph closed this as completed Jul 10, 2023
@Ramses-Njasap
Copy link

I guess he is trying to run a realtime application using django.
twisted-iocpsupport is a dependency on Twisted and twisted is a dependency on daphne. So, if he is using daphne, both twisted and twisted-iocpsupport will install automatically when installing daphne.

Using pip freeze > requirements.txt captures all your installations and their dependencies in the requirements.txt file. Deleting twisted-iocpsupport in your requirements.txt file will do the trick.

But, remember, do not make your project to run on gunicorn <<ip address>> projectname.wsgi`. Rather, it should run on daphne <> projectname.asgi:application`` depending on how your project is being setup and whether it uses daphne like I earlier assumed.

Hope I did help out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants