PetterS / quickjs

Thin Python wrapper of https://bellard.org/quickjs/
https://github.com/bellard/QuickJS
MIT License
175 stars 19 forks source link

pip install quickjs fails #130

Closed SofiaEngvall closed 9 months ago

SofiaEngvall commented 10 months ago

My tries to install quickjs have all failed. Since _I noticed the vs2022 paths I have updated vs to the latest version. I have also tried installing in an admin ps shell and get almost identical output. Just that first line differs. I have python 3.11.5. I noticed this when trying to install vercel-llm-api as quickjs is a dependency.

ERROR: Failed building wheel for quickjs

error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.37.32822\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2

cl : Command line error D8021 : invalid numeric argument '/Werror=incompatible-pointer-types'

Thank you! <3

/Sofia

> pip install quickjs       
Defaulting to user installation because normal site-packages is not writeable
Collecting quickjs
  Using cached quickjs-1.19.2.tar.gz (455 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: quickjs
  Building wheel for quickjs (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\quickjs
      copying quickjs\__init__.py -> build\lib.win-amd64-cpython-311\quickjs
      running build_ext
      building '_quickjs' extension
      creating build\temp.win-amd64-cpython-311
      creating build\temp.win-amd64-cpython-311\Release
      creating build\temp.win-amd64-cpython-311\Release\upstream-quickjs
      "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DCONFIG_VERSION=\"2021-03-27\" -DCONFIG_BIGNUM "-IC:\Program Files\Python311\include" "-IC:\Program Files\Python311\Include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files\Microsoft 
Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcmodule.c /Fobuild\temp.win-amd64-cpython-311\Release\module.obj -Werror=incompatible-pointer-types
      cl : Command line error D8021 : invalid numeric argument '/Werror=incompatible-pointer-types'
      error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.37.32822\\bin\\HostX86\\x64\\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 quickjs
  Running setup.py clean for quickjs
Failed to build quickjs
ERROR: Could not build wheels for quickjs, which is required to install pyproject.toml-based projects
PetterS commented 9 months ago

Sorry, I am unable to help with compilation issues on Windows. That is ill-supported in Python in general

qwenger commented 9 months ago

Official wheels for Python 3.11 on Windows have been built and pushed to PyPI. You should now be able to install quickjs without having to compile C code. Sorry for the delay.