当前位置: 首页 > 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)

http://www.xdnf.cn/news/1067275.html

相关文章:

  • CentOS 7 通过YUM安装MySQL 8.0完整指南
  • 专题:2025大模型2.0:GPT到DeepSeek技术演进与产业落地报告|附200+份报告PDF汇总下载
  • 云原生周刊:Argo CD v3.1 正式发布
  • MySQL优化:使用 LIMIT 进行分页查询时,偏移量过大造成查询性能降低问题分析
  • AS32A601与ASM1042芯片在电力系统自动化监控中的应用效能分析
  • 基于PostgreSQL的百度或高德等POI多层级分类的数据库设计
  • Towards Generalizable Diabetic Retinopathy Grading in Unseen Domains
  • 【ARM 嵌入式 编译系列 7.5 -- GCC 打印链接脚本各段使用信息】
  • c++IO类
  • HTML语义化标签
  • ubuntu安装postman教程并中文汉化详细教程
  • 互联网大数据求职面试:从Zookeeper到Flink的技术探讨
  • Gateway路径匹配规则易错点
  • 自回归(AR)与掩码(MLM)的核心区别:续写还是补全?
  • VitePress搭建静态博客
  • 【机器人-深度估计】双目深度估计原理解析
  • 【格与代数系统】示例2
  • 黑马程序员苍穹外卖DAY1
  • 【AI News | 20250623】每日AI进展
  • 基于openfeign拦截器RequestInterceptor实现的微服务之间的夹带转发
  • 支持java8的kafka版本
  • Python csv 模块
  • Spring MVC极简入门:从@Request到Postman的全链路开发
  • python中学物理实验模拟:平抛运动和抛物运动
  • 苹果芯片macOS安装版Homebrew(亲测) ,一键安装node、python、vscode等,比绿色软件还干净、无污染
  • 触摸屏(典型 I2C + Input 子系统设备)从设备树解析到触摸事件上报
  • 深入浅出Node.js后端开发
  • Python基础之函数
  • Python基础(​​FAISS​和​​Chroma​)
  • Redis哨兵模式深度解析与实战部署