当前位置: 首页 > news >正文

报错:macOS 安装 sentencepiece

文章目录

    • 核心报错信息
    • 解决方法
    • 报错详情


核心报错信息

Perhaps you should add the directory containing `protobuf-lite.pc'to the PKG_CONFIG_PATH environment variablePackage 'protobuf-lite', required by 'sentencepiece', not foundCMake Error at CMakeLists.txt:15 (cmake_minimum_required):Compatibility with CMake < 3.5 has been removed from CMake.

解决方法

原因:缺少 protobuf-lite

安装

brew install protobuf 

报错详情

$ pip install sentencepiece
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting sentencepieceUsing cached https://pypi.tuna.tsinghua.edu.cn/packages/c9/d2/b9c7ca067c26d8ff085d252c89b5f69609ca93fb85a00ede95f4857865d4/sentencepiece-0.2.0.tar.gz (2.6 MB)Preparing metadata (setup.py) ... done
Building wheels for collected packages: sentencepieceBuilding wheel for sentencepiece (setup.py) ... errorerror: subprocess-exited-with-error× python setup.py bdist_wheel did not run successfully.│ exit code: 1╰─> [121 lines of output]/opt/miniconda3/lib/python3.13/site-packages/setuptools/_distutils/dist.py:289: UserWarning: Unknown distribution option: 'test_suite'warnings.warn(msg)/opt/miniconda3/lib/python3.13/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.!!********************************************************************************Please consider removing the following classifiers in favor of a SPDX license expression:License :: OSI Approved :: Apache Software LicenseSee https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.********************************************************************************!!self._finalize_license_expression()running bdist_wheelrunning buildrunning build_pycreating build/lib.macosx-11.1-arm64-cpython-313/sentencepiececopying src/sentencepiece/__init__.py -> build/lib.macosx-11.1-arm64-cpython-313/sentencepiececopying src/sentencepiece/_version.py -> build/lib.macosx-11.1-arm64-cpython-313/sentencepiececopying src/sentencepiece/sentencepiece_model_pb2.py -> build/lib.macosx-11.1-arm64-cpython-313/sentencepiececopying src/sentencepiece/sentencepiece_pb2.py -> build/lib.macosx-11.1-arm64-cpython-313/sentencepiecerunning build_extPackage protobuf-lite was not found in the pkg-config search path.Perhaps you should add the directory containing `protobuf-lite.pc'to the PKG_CONFIG_PATH environment variablePackage 'protobuf-lite', required by 'sentencepiece', not foundCMake Error at CMakeLists.txt:15 (cmake_minimum_required):Compatibility with CMake < 3.5 has been removed from CMake.Update the VERSION argument <min> value.  Or, use the <min>...<max> syntaxto tell CMake that the project requires at least <min> but has been updatedto work with policies introduced by <max> or earlier.Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.-- Configuring incomplete, errors occurred!Error: could not find CMAKE_PROJECT_NAME in CacheTraceback (most recent call last):File "<string>", line 2, in <module>exec(compile('''~~~~^^^^^^^^^^^^# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...<31 lines>...exec(compile(setup_py_code, filename, "exec"))^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^''' % ('/private/var/folders/tm/7kjyfvf118j15fz2w8gysq5w0000gn/T/pip-install-x82mla3v/sentencepiece_18978140ed8140419b2390dc1b3101a4/setup.py',), "<pip-setuptools-caller>", "exec"))^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "<pip-setuptools-caller>", line 34, in <module>File "/private/var/folders/tm/7kjyfvf118j15fz2w8gysq5w0000gn/T/pip-install-x82mla3v/sentencepiece_18978140ed8140419b2390dc1b3101a4/setup.py", line 169, in <module>setup(~~~~~^name='sentencepiece',^^^^^^^^^^^^^^^^^^^^^...<29 lines>...test_suite='sentencepiece_test.suite',^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^)^File "/opt/miniconda3/lib/python3.13/site-packages/setuptools/__init__.py", line 117, in setupreturn distutils.core.setup(**attrs)~~~~~~~~~~~~~~~~~~~~^^^^^^^^^File "/opt/miniconda3/lib/python3.13/site-packages/setuptools/_distutils/core.py", line 186, in setupreturn run_commands(dist)File "/opt/miniconda3/lib/python3.13/site-packages/setuptools/_distutils/core.py", line 202, in run_commandsdist.run_commands()~~~~~~~~~~~~~~~~~^^File "/opt/miniconda3/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 1002, in run_commandsself.run_command(cmd)~~~~~~~~~~~~~~~~^^^^^File "/opt/miniconda3/lib/python3.13/site-packages/setuptools/dist.py", line 1104, in run_commandsuper().run_command(command)~~~~~~~~~~~~~~~~~~~^^^^^^^^^File "/opt/miniconda3/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 1021, in run_commandcmd_obj.run()~~~~~~~~~~~^^File "/opt/miniconda3/lib/python3.13/site-packages/setuptools/command/bdist_wheel.py", line 370, in runself.run_command("build")~~~~~~~~~~~~~~~~^^^^^^^^^File "/opt/miniconda3/lib/python3.13/site-packages/setuptools/_distutils/cmd.py", line 357, in run_commandself.distribution.run_command(command)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^File "/opt/miniconda3/lib/python3.13/site-packages/setuptools/dist.py", line 1104, in run_commandsuper().run_command(command)~~~~~~~~~~~~~~~~~~~^^^^^^^^^File "/opt/miniconda3/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 1021, in run_commandcmd_obj.run()~~~~~~~~~~~^^File "/opt/miniconda3/lib/python3.13/site-packages/setuptools/_distutils/command/build.py", line 135, in runself.run_command(cmd_name)~~~~~~~~~~~~~~~~^^^^^^^^^^File "/opt/miniconda3/lib/python3.13/site-packages/setuptools/_distutils/cmd.py", line 357, in run_commandself.distribution.run_command(command)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^File "/opt/miniconda3/lib/python3.13/site-packages/setuptools/dist.py", line 1104, in run_commandsuper().run_command(command)~~~~~~~~~~~~~~~~~~~^^^^^^^^^File "/opt/miniconda3/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 1021, in run_commandcmd_obj.run()~~~~~~~~~~~^^File "/opt/miniconda3/lib/python3.13/site-packages/setuptools/command/build_ext.py", line 99, in run_build_ext.run(self)~~~~~~~~~~~~~~^^^^^^File "/opt/miniconda3/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 368, in runself.build_extensions()~~~~~~~~~~~~~~~~~~~~~^^File "/opt/miniconda3/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 484, in build_extensionsself._build_extensions_serial()~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^File "/opt/miniconda3/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 510, in _build_extensions_serialself.build_extension(ext)~~~~~~~~~~~~~~~~~~~~^^^^^File "/private/var/folders/tm/7kjyfvf118j15fz2w8gysq5w0000gn/T/pip-install-x82mla3v/sentencepiece_18978140ed8140419b2390dc1b3101a4/setup.py", line 87, in build_extensionsubprocess.check_call(['./build_bundled.sh', __version__])~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/opt/miniconda3/lib/python3.13/subprocess.py", line 421, in check_callraise CalledProcessError(retcode, cmd)subprocess.CalledProcessError: Command '['./build_bundled.sh', '0.2.0']' returned non-zero exit status 1.[end of output]note: This error originates from a subprocess, and is likely not a problem with pip.ERROR: Failed building wheel for sentencepieceRunning setup.py clean for sentencepiece
Failed to build sentencepiece
ERROR: Failed to build installable wheels for some pyproject.toml based projects (sentencepiece)

相关文章:

  • 免费设计素材的网站企业管理培训课程
  • 怎么识别网站开发语言百度账号查询
  • 进一步加强政府网站建设百度用户服务中心官网电话
  • dw做视频网站百度公司推广
  • 网站开发文档要求百度关键词搜索技巧
  • 如何让自己的网站被百度收录邵阳做网站的公司
  • VIVADO导出仿真数据到MATLAB中进行分析
  • Spring Boot 中整合 Redis
  • 防御OSS Bucket泄露:RAM权限策略+日志审计+敏感数据扫描三重防护
  • 10.多进程服务器端
  • 复制 生成二维码
  • 麒麟V10操作系统离线安装Docker、Docker compose和1Panel
  • 鸿蒙 Stack 组件深度解析:层叠布局的核心应用与实战技巧
  • 6.24_JAVA_微服务_Elasticsearch搜索
  • 用Rust写平衡三进制加法器
  • 华为云Flexus+DeepSeek征文|基于华为云Flexus Dify复用优秀 AI Agent 应用教程
  • TMS汽车热管理系统HILRCP解决方案
  • FastMCP+python简单测试
  • Jenkins+Jmeter+Ant接口持续集成
  • 信创建设,如何统一管理异构服务器的认证、密码、权限管理等?
  • 配置自己的NTP 服务器做时间同步
  • 从零学习linux(2)——管理
  • 缺少 XML 验证与资源注入修复
  • Revisiting Image Deblurring with an Efficient ConvNet论文阅读
  • Joblib库多进程/线程使用(一):使用generator参数实现边响应边使用
  • leetcode61.旋转链表