scrapinghub / python-crfsuite

A python binding for crfsuite
MIT License
769 stars 223 forks source link

Installation of python-crfsuite 0.9.9 failed on Windows Server 2016 #155

Closed bergen288 closed 7 months ago

bergen288 commented 9 months ago

My Python version is 3.11.3 on both Windows 10 laptop and Windows Server 2016. python-crfsuite 0.9.9 is installed successfully on Windows 10 laptop, but it failed on Windows Server 2016 with following error. Can you please help me to fix it?

E:\>pip install python-crfsuite
Collecting python-crfsuite
  Using cached python-crfsuite-0.9.9.tar.gz (440 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: python-crfsuite
  Building wheel for python-crfsuite (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [25 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\pycrfsuite
      copying pycrfsuite\_dumpparser.py -> build\lib.win-amd64-cpython-311\pycrfsuite
      copying pycrfsuite\_logparser.py -> build\lib.win-amd64-cpython-311\pycrfsuite
      copying pycrfsuite\__init__.py -> build\lib.win-amd64-cpython-311\pycrfsuite
      running build_ext
      building 'pycrfsuite._pycrfsuite' extension
      creating build\temp.win-amd64-cpython-311
      creating build\temp.win-amd64-cpython-311\Release
      creating build\temp.win-amd64-cpython-311\Release\crfsuite
      creating build\temp.win-amd64-cpython-311\Release\crfsuite\lib
      creating build\temp.win-amd64-cpython-311\Release\crfsuite\lib\cqdb
      creating build\temp.win-amd64-cpython-311\Release\crfsuite\lib\cqdb\src
      creating build\temp.win-amd64-cpython-311\Release\crfsuite\lib\crf
      creating build\temp.win-amd64-cpython-311\Release\crfsuite\lib\crf\src
      creating build\temp.win-amd64-cpython-311\Release\crfsuite\swig
      creating build\temp.win-amd64-cpython-311\Release\liblbfgs
      creating build\temp.win-amd64-cpython-311\Release\liblbfgs\lib
      creating build\temp.win-amd64-cpython-311\Release\pycrfsuite
      cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Icrfsuite/include/ -Icrfsuite/lib/cqdb/include -Iliblbfgs/include -Ipycrfsuite -IE:\Software\Python\include -IE:\Software\Python\Include "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" /Tccrfsuite/lib/cqdb/src/cqdb.c /Fobuild\temp.win-amd64-cpython-311\Release\crfsuite/lib/cqdb/src/cqdb.obj
      error: command 'cl.exe' failed: None
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for python-crfsuite
  Running setup.py clean for python-crfsuite
Failed to build python-crfsuite
ERROR: Could not build wheels for python-crfsuite, which is required to install pyproject.toml-based projects
fgregg commented 7 months ago

should work now!

bergen288 commented 7 months ago

Yes, the installation finished successfully on my Windows 2016 server now after python_crfsuite-0.9.10-cp311-cp311-win_amd64.whl is available.

Thanks.