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

twisted-iocpsupport should be part of the windows-platform extra, not a hard requirement #11893

Open
glyph opened this issue Jul 7, 2023 · 4 comments · May be fixed by #12144
Open

twisted-iocpsupport should be part of the windows-platform extra, not a hard requirement #11893

glyph opened this issue Jul 7, 2023 · 4 comments · May be fixed by #12144

Comments

@glyph
Copy link
Member

glyph commented Jul 7, 2023

Periodically, people report issues like #11891 when trying to use Twisted on Windows. There are two problems here.

The first is that our CI pipeline for twisted-iocpsupport should be more proactive and produce extension modules for all configurations that a Windows user might encounter.

However, we are never going to be able to be completely comprehensive there, and thus we should make it so that pip install twisted can function as a pure-python package on Windows as it does on other platforms. So while we should make pip install twisted[all] work well by doing the first thing, we should also do this.

@ThomasSpare
Copy link

I had this exact error when I installed VSCode on my chromebook using Linux. The error appear when trying to install requirements.txt in my restframework backend. Pip install twisted did not solve this issue.. Neither did pip install[all] - it only gives this WARNING: twisted 23.10.0 does not provide the extra 'all' . I am running python 3.11.2
I have this same project in vscode on my windows machine and it works fine, but not with chromebook. If I find a solution I will make a follow up post here.

Traceback:

Collecting psycopg2
  Using cached psycopg2-2.9.9.tar.gz (384 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: twisted-iocpsupport
  Building wheel for twisted-iocpsupport (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for twisted-iocpsupport (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [13 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'twisted_iocpsupport.iocpsupport' extension
      creating build
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/twisted_iocpsupport
      x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Itwisted_iocpsupport -I/home/tsparejkpg/BabyGear-main-main/venv/include -I/usr/include/python3.11 -c twisted_iocpsupport/iocpsupport.c -o build/temp.linux-x86_64-cpython-311/twisted_iocpsupport/iocpsupport.o
      twisted_iocpsupport/iocpsupport.c:1210:10: fatal error: io.h: No such file or directory
       1210 | #include "io.h"
            |          ^~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for twisted-iocpsupport
Failed to build twisted-iocpsupport
ERROR: Could not build wheels for twisted-iocpsupport, which is required to install pyproject.toml-based projects

@ThomasSpare
Copy link

Found a solution in my case:
Remove twisted-iocpsupport==1.0.4
Remove incremental==21.3.0
from requirements.txt

@dombroks
Copy link

@ThomasSpare this worked for me too. What are these dependencies used for? I don't remember installing them, but I do think they are related to daphne.

@adiroiban
Copy link
Member

I am giving this a try... please add your feedback to #12144

Thanks

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

Successfully merging a pull request may close this issue.

4 participants