PaddleHub icon indicating copy to clipboard operation
PaddleHub copied to clipboard

mac M1 安装paddlehub出错!!! 表示很折磨,望各位大佬指点一二~

Open yoeaki opened this issue 2 years ago • 1 comments

欢迎您反馈PaddleHub使用问题,非常感谢您对PaddleHub的贡献! 在留下您的问题时,辛苦您同步提供如下信息:

  • 版本、环境信息 1)python环境3.8和3.9都尝试过。 安装命令如下,顺序执行。安装paddlepaddle成功,安装paddlehub失败。【也尝试过用pycharm中手动安装,paddlehub依然无法安装】 !pip install --upgrade paddlepaddle -i https://mirror.baidu.com/pypi/simple !pip install --upgrade paddlehub -i https://mirror.baidu.com/pypi/simple 2)系统环境:macBook m1pro。
  1. 报错信息如下: `Collecting platformdirs<3,>=2 Using cached https://mirror.baidu.com/pypi/packages/ed/22/967181c94c3a4063fe64e15331b4cb366bdd7dfbf46fcb8ad89650026fec/platformdirs-2.5.2-py3-none-any.whl (14 kB) Collecting scikit-learn>=0.21.3 Downloading https://mirror.baidu.com/pypi/packages/0f/ae/9d01b5419ae47a429215ff1135118503ae3d119e14b73ae7596ddc1cdf03/scikit_learn-1.1.1-cp38-cp38-macosx_12_0_arm64.whl (7.6 MB) |████████████████████████████████| 7.6 MB 1.9 MB/s Collecting joblib>=1.0.0 Using cached https://mirror.baidu.com/pypi/packages/3e/d5/0163eb0cfa0b673aa4fe1cd3ea9d8a81ea0f32e50807b0c295871e4aab2e/joblib-1.1.0-py2.py3-none-any.whl (306 kB) Collecting scipy>=1.3.2 Downloading https://mirror.baidu.com/pypi/packages/dc/76/239ef199165e234b6422822873e00544a83da5e457db63302f592380b16c/scipy-1.8.1-cp38-cp38-macosx_12_0_arm64.whl (28.6 MB) |████████████████████████████████| 28.6 MB 2.2 MB/s Collecting threadpoolctl>=2.0.0 Using cached https://mirror.baidu.com/pypi/packages/61/cf/6e354304bcb9c6413c4e02a747b600061c21d38ba51e7e544ac7bc66aecc/threadpoolctl-3.1.0-py3-none-any.whl (14 kB) Building wheels for collected packages: onnx, pyyaml, bce-python-sdk, future, pycryptodome, easydict, jieba, pyzmq, sentencepiece, seqeval, shellcheck-py Building wheel for onnx (PEP 517) ... error ERROR: Command errored out with exit status 1: command: /Users/xilongyuan/opt/anaconda3/envs/my_python_env/bin/python /Users/xilongyuan/opt/anaconda3/envs/my_python_env/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/tmptj24o15z cwd: /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/onnx_8505a113c4b14037ac2558a5c210cb8d Complete output (93 lines): fatal: not a git repository (or any of the parent directories): .git running bdist_wheel running build running build_py running create_version running cmake_build Using cmake args: ['/usr/local/bin/cmake', '-DPYTHON_INCLUDE_DIR=/Users/xilongyuan/opt/anaconda3/envs/my_python_env/include/python3.8', '-DPYTHON_EXECUTABLE=/Users/xilongyuan/opt/anaconda3/envs/my_python_env/bin/python', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-38-darwin.so', '-DCMAKE_BUILD_TYPE=Release', '-DONNX_ML=1', '/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/onnx_8505a113c4b14037ac2558a5c210cb8d'] -- The C compiler identification is AppleClang 13.1.6.13160021 -- The CXX compiler identification is AppleClang 13.1.6.13160021 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PythonInterp: /Users/xilongyuan/opt/anaconda3/envs/my_python_env/bin/python (found version "3.8.13") -- Found PythonLibs: /Users/xilongyuan/opt/anaconda3/envs/my_python_env/lib/libpython3.8.dylib (found version "3.8.13") Generated: /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/onnx_8505a113c4b14037ac2558a5c210cb8d/.setuptools-cmake-build/onnx/onnx-ml.proto CMake Error at CMakeLists.txt:292 (message): Protobuf compiler not found Call Stack (most recent call first): CMakeLists.txt:323 (relative_protobuf_generate_cpp)

-- Configuring incomplete, errors occurred! See also "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/onnx_8505a113c4b14037ac2558a5c210cb8d/.setuptools-cmake-build/CMakeFiles/CMakeOutput.log". See also "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/onnx_8505a113c4b14037ac2558a5c210cb8d/.setuptools-cmake-build/CMakeFiles/CMakeError.log". /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/dist.py:772: UserWarning: Usage of dash-separated 'license-file' will not be supported in future versions. Please use the underscore name 'license_file' instead warnings.warn( /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/config/setupcfg.py:459: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead. warnings.warn(msg, warning_class) Traceback (most recent call last): File "/Users/xilongyuan/opt/anaconda3/envs/my_python_env/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 349, in main() File "/Users/xilongyuan/opt/anaconda3/envs/my_python_env/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 331, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/Users/xilongyuan/opt/anaconda3/envs/my_python_env/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 248, in build_wheel return _build_backend().build_wheel(wheel_directory, config_settings, File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 244, in build_wheel return self._build_with_temp_dir(['bdist_wheel'], '.whl', File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 229, in _build_with_temp_dir self.run_setup() File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 281, in run_setup super(_BuildMetaLegacyBackend, File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 174, in run_setup exec(compile(code, file, 'exec'), locals()) File "setup.py", line 337, in setuptools.setup( File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/init.py", line 87, in setup return distutils.core.setup(**attrs) File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 148, in setup return run_commands(dist) File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 163, in run_commands dist.run_commands() File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands self.run_command(cmd) File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 1229, in run_command super().run_command(command) File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command cmd_obj.run() File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 299, in run self.run_command('build') File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 1229, in run_command super().run_command(command) File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command cmd_obj.run() File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 136, in run self.run_command(cmd_name) File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 1229, in run_command super().run_command(command) File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command cmd_obj.run() File "setup.py", line 233, in run self.run_command('cmake_build') File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 1229, in run_command super().run_command(command) File "/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-build-env-sq9j6y7y/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command cmd_obj.run() File "setup.py", line 219, in run subprocess.check_call(cmake_args) File "/Users/xilongyuan/opt/anaconda3/envs/my_python_env/lib/python3.8/subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/usr/local/bin/cmake', '-DPYTHON_INCLUDE_DIR=/Users/xilongyuan/opt/anaconda3/envs/my_python_env/include/python3.8', '-DPYTHON_EXECUTABLE=/Users/xilongyuan/opt/anaconda3/envs/my_python_env/bin/python', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-38-darwin.so', '-DCMAKE_BUILD_TYPE=Release', '-DONNX_ML=1', '/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/onnx_8505a113c4b14037ac2558a5c210cb8d']' returned non-zero exit status 1.

ERROR: Failed building wheel for onnx Building wheel for pyyaml (PEP 517) ... done Created wheel for pyyaml: filename=PyYAML-6.0-cp38-cp38-macosx_11_0_arm64.whl size=45336 sha256=c2efca1fb128cc88d6a9d5b7ffcf973b410d38dfd28e0cc4000a9db181de5292 Stored in directory: /Users/xilongyuan/Library/Caches/pip/wheels/4c/d1/99/5764153d21fcc5482942956a9e84b11c49b72a70d68ba9a82f Building wheel for bce-python-sdk (setup.py) ... done Created wheel for bce-python-sdk: filename=bce_python_sdk-0.8.64-py3-none-any.whl size=202973 sha256=46c41e2d98c136f978f4f172702a445c0a7554962d78684385e6cd1341dc66f2 Stored in directory: /Users/xilongyuan/Library/Caches/pip/wheels/e4/da/88/302e8713bb419930687c4ffb5a68425f58b71553a4ba08a252 Building wheel for future (setup.py) ... done Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=491070 sha256=bf9d495271a73bd4c43d7ce2bfe476950bda9f5a04d994784636c3488f6c1b8a Stored in directory: /Users/xilongyuan/Library/Caches/pip/wheels/bb/b4/25/d4ed0b0183f33df9bdfb686bbb497a8e991dc982f1dc769246 Building wheel for pycryptodome (setup.py) ... done Created wheel for pycryptodome: filename=pycryptodome-3.14.1-cp35-abi3-macosx_11_0_arm64.whl size=1492038 sha256=55c66788eae374c4ad79ed90ae1240862cba45787abdda406f39cf4932003dbc Stored in directory: /Users/xilongyuan/Library/Caches/pip/wheels/94/68/18/0d1e0b81a7e2c922bc4ebd27ba72497a162ea223499f6e4c14 Building wheel for easydict (setup.py) ... done Created wheel for easydict: filename=easydict-1.9-py3-none-any.whl size=6360 sha256=4314fbc828c288b7fe2571bba347f2300f9d50190024ea0ec032c3cb7ca1a9ad Stored in directory: /Users/xilongyuan/Library/Caches/pip/wheels/59/72/8c/44c1d450d0904b407eb66e9c52a350f60793104e181bc66f38 Building wheel for jieba (setup.py) ... done Created wheel for jieba: filename=jieba-0.42.1-py3-none-any.whl size=19314478 sha256=e2b3df942fcbabfb2ebb2ed577f65dee29af204090e2b1e3d16d37526e31e39c Stored in directory: /Users/xilongyuan/Library/Caches/pip/wheels/05/dc/ba/f944581209d5484a10b6a1a517832e77c26ee1d06237c60307 Building wheel for pyzmq (PEP 517) ... done Created wheel for pyzmq: filename=pyzmq-23.0.0-cp38-cp38-macosx_11_0_arm64.whl size=766774 sha256=1cdca72d6ad4512171a924c67bad77544b9aad916a6c014e9f5155bd743dce45 Stored in directory: /Users/xilongyuan/Library/Caches/pip/wheels/0b/30/45/debfd6cdd2dd65c65ee57617308cc80958c7930bf60313b2ce Building wheel for sentencepiece (setup.py) ... error ERROR: Command errored out with exit status 1: command: /Users/xilongyuan/opt/anaconda3/envs/my_python_env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/sentencepiece_ab9337508aef4253a8bc547f72eb47ae/setup.py'"'"'; file='"'"'/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/sentencepiece_ab9337508aef4253a8bc547f72eb47ae/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-wheel-ytvnoxgb cwd: /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/sentencepiece_ab9337508aef4253a8bc547f72eb47ae/ Complete output (162 lines): /Users/xilongyuan/opt/anaconda3/envs/my_python_env/lib/python3.8/site-packages/setuptools/dist.py:757: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead warnings.warn( running bdist_wheel running build running build_py creating build creating build/lib.macosx-11.1-arm64-3.8 creating build/lib.macosx-11.1-arm64-3.8/sentencepiece copying src/sentencepiece/init.py -> build/lib.macosx-11.1-arm64-3.8/sentencepiece copying src/sentencepiece/sentencepiece_model_pb2.py -> build/lib.macosx-11.1-arm64-3.8/sentencepiece copying src/sentencepiece/sentencepiece_pb2.py -> build/lib.macosx-11.1-arm64-3.8/sentencepiece running build_ext /bin/sh: pkg-config: command not found Cloning into 'sentencepiece'... 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 <new-branch-name>

Or undo this operation with:

git switch -

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

-- VERSION: 0.1.96 -- The C compiler identification is AppleClang 13.1.6.13160021 -- The CXX compiler identification is AppleClang 13.1.6.13160021 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Not Found TCMalloc: TCMALLOC_LIB-NOTFOUND -- Configuring done -- Generating done -- Build files have been written to: /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/sentencepiece_ab9337508aef4253a8bc547f72eb47ae/bundled/sentencepiece/build ./build_bundled.sh: line 16: nproc: command not found [ 3%] Building CXX object src/CMakeFiles/sentencepiece_train-static.dir/unigram_model_trainer.cc.o [ 1%] Building CXX object src/CMakeFiles/sentencepiece_train-static.dir/unicode_script.cc.o [ 4%] Building CXX object src/CMakeFiles/sentencepiece_train-static.dir/trainer_interface.cc.o [ 6%] Building CXX object src/CMakeFiles/sentencepiece_train-static.dir/builder.cc.o [ 7%] Building CXX object src/CMakeFiles/sentencepiece_train-static.dir/word_model_trainer.cc.o [ 9%] Building CXX object src/CMakeFiles/sentencepiece_train-static.dir/char_model_trainer.cc.o [ 11%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/extension_set.cc.o [ 14%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/bytestream.cc.o [ 14%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/arenastring.cc.o [ 15%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/arena.cc.o [ 19%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/common.cc.o [ 19%] Building CXX object src/CMakeFiles/sentencepiece_train-static.dir/trainer_factory.cc.o [ 20%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/implicit_weak_message.cc.o [ 22%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/coded_stream.cc.o [ 23%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/generated_enum_util.cc.o [ 25%] Building CXX object src/CMakeFiles/sentencepiece_train-static.dir/pretokenizer_for_training.cc.o [ 26%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/generated_message_util.cc.o [ 28%] Building CXX object src/CMakeFiles/sentencepiece_train-static.dir/bpe_model_trainer.cc.o [ 30%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/io_win32.cc.o [ 31%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/generated_message_table_driven_lite.cc.o [ 33%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/parse_context.cc.o [ 36%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/repeated_field.cc.o [ 36%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/int128.cc.o [ 38%] Building CXX object src/CMakeFiles/sentencepiece_train-static.dir/sentencepiece_trainer.cc.o [ 39%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/time.cc.o [ 41%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/message_lite.cc.o [ 42%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/strutil.cc.o [ 44%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/status.cc.o [ 46%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/statusor.cc.o [ 47%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/stringprintf.cc.o [ 49%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/structurally_valid.cc.o [ 50%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/stringpiece.cc.o [ 52%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/zero_copy_stream_impl_lite.cc.o [ 55%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/zero_copy_stream.cc.o [ 55%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/wire_format_lite.cc.o [ 57%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/protobuf-lite/zero_copy_stream_impl.cc.o [ 58%] Building CXX object src/CMakeFiles/sentencepiece-static.dir/builtin_pb/sentencepiece.pb.cc.o [ 60%] Building CXX object src/CMakeFiles/sentencepiece-static.dir/error.cc.o [ 61%] Building CXX object src/CMakeFiles/sentencepiece-static.dir/bpe_model.cc.o [ 63%] Building CXX object src/CMakeFiles/sentencepiece-static.dir/filesystem.cc.o [ 66%] Building CXX object src/CMakeFiles/sentencepiece-static.dir/model_factory.cc.o [ 65%] Building CXX object src/CMakeFiles/sentencepiece-static.dir/builtin_pb/sentencepiece_model.pb.cc.o [ 68%] Building CXX object src/CMakeFiles/sentencepiece-static.dir/char_model.cc.o [ 69%] Building CXX object src/CMakeFiles/sentencepiece-static.dir/model_interface.cc.o [ 71%] Building CXX object src/CMakeFiles/sentencepiece-static.dir/normalizer.cc.o [ 73%] Building CXX object src/CMakeFiles/sentencepiece-static.dir/util.cc.o [ 74%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/absl/strings/string_view.cc.o [ 76%] Building CXX object src/CMakeFiles/sentencepiece-static.dir//third_party/absl/flags/flag.cc.o [ 77%] Building CXX object src/CMakeFiles/sentencepiece-static.dir/sentencepiece_processor.cc.o [ 80%] Building CXX object src/CMakeFiles/sentencepiece-static.dir/unigram_model.cc.o [ 80%] Building CXX object src/CMakeFiles/sentencepiece-static.dir/word_model.cc.o /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/sentencepiece_ab9337508aef4253a8bc547f72eb47ae/bundled/sentencepiece/src/builder.cc:46:15: warning: unused variable 'kMaxUnicode' [-Wunused-const-variable] constexpr int kMaxUnicode = 0x10FFFF; ^ /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/sentencepiece_ab9337508aef4253a8bc547f72eb47ae/bundled/sentencepiece/src/builder.cc:48:23: warning: unused variable 'kDefaultNormalizerName' [-Wunused-const-variable] static constexpr char kDefaultNormalizerName[] = "nfkc"; ^ 2 warnings generated. [ 82%] Linking CXX static library libsentencepiece.a /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libsentencepiece.a(io_win32.cc.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libsentencepiece.a(io_win32.cc.o) has no symbols [ 82%] Built target sentencepiece-static [ 87%] Building CXX object src/CMakeFiles/spm_export_vocab.dir/spm_export_vocab_main.cc.o [ 87%] Building CXX object src/CMakeFiles/spm_encode.dir/spm_encode_main.cc.o [ 87%] Building CXX object src/CMakeFiles/spm_decode.dir/spm_decode_main.cc.o [ 88%] Linking CXX executable spm_export_vocab [ 88%] Built target spm_export_vocab [ 90%] Linking CXX static library libsentencepiece_train.a [ 90%] Built target sentencepiece_train-static [ 93%] Building CXX object src/CMakeFiles/spm_train.dir/spm_train_main.cc.o [ 93%] Building CXX object src/CMakeFiles/spm_normalize.dir/spm_normalize_main.cc.o [ 95%] Linking CXX executable spm_decode [ 95%] Built target spm_decode [ 96%] Linking CXX executable spm_encode [ 98%] Linking CXX executable spm_normalize [ 98%] Built target spm_encode [100%] Linking CXX executable spm_train [100%] Built target spm_normalize [100%] Built target spm_train Consolidate compiler generated dependencies of target sentencepiece-static [ 66%] Built target sentencepiece-static Consolidate compiler generated dependencies of target sentencepiece_train-static [ 84%] Built target sentencepiece_train-static Consolidate compiler generated dependencies of target spm_encode [ 87%] Built target spm_encode Consolidate compiler generated dependencies of target spm_decode [ 90%] Built target spm_decode Consolidate compiler generated dependencies of target spm_normalize [ 93%] Built target spm_normalize Consolidate compiler generated dependencies of target spm_train [ 96%] Built target spm_train Consolidate compiler generated dependencies of target spm_export_vocab [100%] Built target spm_export_vocab Install the project... -- Install configuration: "" -- Installing: /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/sentencepiece_ab9337508aef4253a8bc547f72eb47ae/bundled/lib/pkgconfig/sentencepiece.pc -- Installing: /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/sentencepiece_ab9337508aef4253a8bc547f72eb47ae/bundled/lib/libsentencepiece.a /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/sentencepiece_ab9337508aef4253a8bc547f72eb47ae/bundled/lib/libsentencepiece.a(io_win32.cc.o) has no symbols -- Installing: /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/sentencepiece_ab9337508aef4253a8bc547f72eb47ae/bundled/lib/libsentencepiece_train.a -- Installing: /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/sentencepiece_ab9337508aef4253a8bc547f72eb47ae/bundled/bin/spm_encode -- Installing: /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/sentencepiece_ab9337508aef4253a8bc547f72eb47ae/bundled/bin/spm_decode -- Installing: /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/sentencepiece_ab9337508aef4253a8bc547f72eb47ae/bundled/bin/spm_normalize -- Installing: /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/sentencepiece_ab9337508aef4253a8bc547f72eb47ae/bundled/bin/spm_train -- Installing: /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/sentencepiece_ab9337508aef4253a8bc547f72eb47ae/bundled/bin/spm_export_vocab -- Installing: /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/sentencepiece_ab9337508aef4253a8bc547f72eb47ae/bundled/include/sentencepiece_trainer.h -- Installing: /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/sentencepiece_ab9337508aef4253a8bc547f72eb47ae/bundled/include/sentencepiece_processor.h env: pkg-config: No such file or directory Failed to find sentencepiece pkg-config

ERROR: Failed building wheel for sentencepiece Running setup.py clean for sentencepiece Building wheel for seqeval (setup.py) ... done Created wheel for seqeval: filename=seqeval-1.2.2-py3-none-any.whl size=16180 sha256=436c7a1f1ab00bd6b1734beb2a5756a814d08b39bd9c44369bcae6ce5b7c0b11 Stored in directory: /Users/xilongyuan/Library/Caches/pip/wheels/7c/c8/fc/e48d82a46f498df175b24a2a6901019c392926495959372732 Building wheel for shellcheck-py (setup.py) ... error ERROR: Command errored out with exit status 1: command: /Users/xilongyuan/opt/anaconda3/envs/my_python_env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/shellcheck-py_1676d9d9396042a89d2f21e6d980c46e/setup.py'"'"'; file='"'"'/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/shellcheck-py_1676d9d9396042a89d2f21e6d980c46e/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-wheel-cjjhqu7l cwd: /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-4j9n75nd/shellcheck-py_1676d9d9396042a89d2f21e6d980c46e/ Complete output (4 lines): running bdist_wheel running build running fetch_binaries error: Remote end closed connection without response

ERROR: Failed building wheel for shellcheck-py Running setup.py clean for shellcheck-py Successfully built pyyaml bce-python-sdk future pycryptodome easydict jieba pyzmq seqeval Failed to build onnx sentencepiece shellcheck-py ERROR: Could not build wheels for onnx which use PEP 517 and cannot be installed directly (my_python_env) xilongyuan@XilongdeMacBook-Pro my-anaconda % pip --trusted-host https://mirror.baidu.com/pypi/simple install shellcheck-py Collecting shellcheck-py Using cached shellcheck_py-0.8.0.4.tar.gz (4.2 kB) Building wheels for collected packages: shellcheck-py Building wheel for shellcheck-py (setup.py) ... error ERROR: Command errored out with exit status 1: command: /Users/xilongyuan/opt/anaconda3/envs/my_python_env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-__zeqigy/shellcheck-py_c17f37c4b18a4138867a159915065a24/setup.py'"'"'; file='"'"'/private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-__zeqigy/shellcheck-py_c17f37c4b18a4138867a159915065a24/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-wheel-rx3lrrv4 cwd: /private/var/folders/47/n1ztkz553rgbn6dgp5lxq2_m0000gn/T/pip-install-__zeqigy/shellcheck-py_c17f37c4b18a4138867a159915065a24/ Complete output (4 lines): running bdist_wheel running build running fetch_binaries error: Remote end closed connection without response

ERROR: Failed building wheel for shellcheck-py`

yoeaki avatar May 27 '22 04:05 yoeaki

我自己来填坑啦 求助朋友 ->田老板田老板表示缺少sentencepiece包。 解决步骤:

  1. 尝试用命令pip install sentencepiece 安装失败~~~
  2. 朋友发来sentencepiece-0.1.96.tar.gz 包,让我手动安装pip install sentencepiece-0.1.96.tar.gz 。依然失败,错误提示:pkg-config' not found. 3.安装pkg-config环境。执行 brew install cairo。安装成功。
  3. 再次执行 pip install sentencepiece-0.1.96.tar.gz 完美。
  4. 执行 pip install --upgrade paddlehub -i https://mirror.baidu.com/pypi/simple 大功告成! 再次感谢我的朋友 田老板

yoeaki avatar May 27 '22 17:05 yoeaki