sentencepiece icon indicating copy to clipboard operation
sentencepiece copied to clipboard

My computer is Mac and I can only use python3.9. The readme is useless.

Open lyq-keep-going opened this issue 5 years ago • 3 comments

my command is 'python setup.py build' while the log says: python setup.py build running build running build_py creating build creating build/lib.macosx-11.0-arm64-3.9 creating build/lib.macosx-11.0-arm64-3.9/sentencepiece copying src/sentencepiece/init.py -> build/lib.macosx-11.0-arm64-3.9/sentencepiece copying src/sentencepiece/sentencepiece_model_pb2.py -> build/lib.macosx-11.0-arm64-3.9/sentencepiece copying src/sentencepiece/sentencepiece_pb2.py -> build/lib.macosx-11.0-arm64-3.9/sentencepiece running build_ext /bin/sh: pkg-config: command not found Cloning into 'sentencepiece'... remote: Enumerating objects: 264, done. remote: Counting objects: 100% (264/264), done. remote: Compressing objects: 100% (241/241), done. remote: Total 264 (delta 55), reused 70 (delta 14), pack-reused 0 Receiving objects: 100% (264/264), 5.60 MiB | 181.00 KiB/s, done. Resolving deltas: 100% (55/55), done. Note: switching to 'd8711f55d9b2cb9c77a00adcc18108482b29b675'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

./build_bundled.sh: line 15: cmake: command not found ./build_bundled.sh: line 16: nproc: command not found make: *** No targets specified and no makefile found. Stop. make: *** No rule to make target `install'. Stop. env: pkg-config: No such file or directory Failed to find sentencepiece pkg-config

lyq-keep-going avatar Sep 27 '21 13:09 lyq-keep-going

"cmake: command not found"
I think Installing package 'cmake' could help.

smsxgz avatar Oct 22 '21 11:10 smsxgz

I have tested that "python setup.py build" is ok with both python37 and python39, here is my macos environment: export CC=/usr/bin/clang export CXX=/usr/bin/clang++ export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

And cmake version is 3.18 and miniconda installed. BTW, my macos is x86_64, i think arm should be the same.

xiefangqi avatar Dec 06 '21 11:12 xiefangqi

Please install cmake and try again.

taku910 avatar Feb 16 '22 04:02 taku910