r/pythonhelp • • Mar 23 '23

pip install giving errors with installing a certain module

Yeah, that, I want to install a module, which installs other modules, one of which requires VCPP 14 or higher, so I installed it.

After installing it now gives some other error, hjow can I fix it?

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
  ╰─> [12 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'twisted_iocpsupport.iocpsupport' extension
      creating build
      creating build\temp.win-amd64-cpython-311
      creating build\temp.win-amd64-cpython-311\Release
      creating build\temp.win-amd64-cpython-311\Release\twisted_iocpsupport
      "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Itwisted_iocpsupport -IC:\Users\TS\AppData\Local\Programs\Python\Python311\include -IC:\Users\TS\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" /Tctwisted_iocpsupport/iocpsupport.c /Fobuild\temp.win-amd64-cpython-311\Release\twisted_iocpsupport/iocpsupport.obj
      iocpsupport.c
      c:\users\ts\appdata\local\programs\python\python311\include\pyconfig.h(207): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit code 2
      [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
3 Upvotes

2 comments sorted by

1

u/HeeebsInc Mar 24 '23

Try running

pip install —upgrade pip

&&

pip install —upgrade setuptools wheel

Then try installing your packages

1

u/roztopasnik Mar 24 '23

It seems to be looking for ms visual studio - c built tools, if there is no wheel it tries to built it itself