4

error image

I was trying to install daphne===4.0.0 but I keep getting this error,

ERROR: Failed building wheel for twisted-iocpsupport

    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
  ╰─> [5 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'twisted_iocpsupport.iocpsupport' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [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
Buddhika Chathuranga
  • 1,334
  • 2
  • 13
  • 22
sunday
  • 49
  • 1
  • 3
  • install Microsoft Visual C++ 14.0 or higher – sahasrara62 Jan 11 '23 at 21:32
  • We had not done a release of this module for python 3.11 yet. I just saw this question kicked off the release process for 1.0.3, which should have wheels uploaded to PyPI within the hour, and you won't see this any more. – Glyph Mar 31 '23 at 06:55

2 Answers2

2

According to the docs,

Applications must not import names from the twisted_iocpsupport package directly.

So, if you're using any file with package versioning (requirements.txt, project.toml, etc.), you should remove-it manually.

  • This solved my issue. Using `pip freeze` after installing scrapy generates a dependency list with `twisted_iocpsupport` pinned, removing the dependency from requirements.txt fixed it. – Dullson Apr 02 '23 at 20:27
1

This error occurs because twisted-iocpsupport is not supported by python 3.11 Consider going back to any versions between 3.6 and 3.10 that fixed the problem for me. Go to twisted-iocpsupport documentation and see the versions of python it supports