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

Error building wheel #827

Closed
eobrien2002 opened this issue Mar 8, 2023 · 7 comments
Closed

Error building wheel #827

eobrien2002 opened this issue Mar 8, 2023 · 7 comments

Comments

@eobrien2002
Copy link

Building wheel for sentencepiece (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [21 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\sentencepiece
copying src\sentencepiece/init.py -> build\lib.win-amd64-cpython-311\sentencepiece
copying src\sentencepiece/_version.py -> build\lib.win-amd64-cpython-311\sentencepiece
copying src\sentencepiece/sentencepiece_model_pb2.py -> build\lib.win-amd64-cpython-311\sentencepiece
copying src\sentencepiece/sentencepiece_pb2.py -> build\lib.win-amd64-cpython-311\sentencepiece
running build_ext
building 'sentencepiece._sentencepiece' extension
creating build\temp.win-amd64-cpython-311
creating build\temp.win-amd64-cpython-311\Release
creating build\temp.win-amd64-cpython-311\Release\src
creating build\temp.win-amd64-cpython-311\Release\src\sentencepiece
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Python311\include -IC:\Python311\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\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" /EHsc /Tpsrc/sentencepiece/sentencepiece_wrap.cxx /Fobuild\temp.win-amd64-cpython-311\Release\src/sentencepiece/sentencepiece_wrap.obj /std:c++17 /MT /I..\build\root\include
cl : Command line warning D9025 : overriding '/MD' with '/MT'
sentencepiece_wrap.cxx
src/sentencepiece/sentencepiece_wrap.cxx(2822): fatal error C1083: Cannot open include file: 'sentencepiece_processor.h': No such file or directory
error: command 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\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 sentencepiece
Running setup.py clean for sentencepiece
Failed to build sentencepiece
Installing collected packages: sentencepiece, jmespath, botocore, s3transfer, boto3, bertviz
Running setup.py install for sentencepiece ... error
error: subprocess-exited-with-error

@luiscosio
Copy link

Did you manage to fix it?

@taku910
Copy link
Collaborator

taku910 commented Mar 16, 2023

Could you build the wheel package from scratch? There is an instruction.

https://github.com/google/sentencepiece/blob/master/python/README.md#build-and-install-sentencepiece

@TomTheFurry
Copy link

Can report having same issue. (The entire python is a new installation. Using py 3.11.2, tried both with or without wheel)

@liednik
Copy link

liednik commented Mar 23, 2023

I had a similar problem with building a docker image (though, ubuntu, not windows) and running apt-get install -y cmake resolved the problem

@pkubik
Copy link

pkubik commented Mar 25, 2023

On Windows, I managed to:

  1. Clone sentencepiece repository and enter the directory
  2. Download latest sentencepiece release without python bindings
  3. Extract bin, include and lib to build/root_amd64
  4. Enter python subdir and run pip install .

The setup.py picks up the files from build and compiles Python 3.11 bindings without errors.

@pkubik
Copy link

pkubik commented Mar 25, 2023

It was also mentioned in #591

@taku910
Copy link
Collaborator

taku910 commented Apr 12, 2023

Fixed in v0.1.98

@taku910 taku910 closed this as completed Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants