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

pyopenjtalk因cmake版本太高导致pip无法安装

错误:

pyopenjtalk

Resolved 191 packages in 528ms
  × Failed to build `pyopenjtalk==0.4.0`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta.build_wheel` failed (exit code: 1)

      [stdout]
      -- Configuring incomplete, errors occurred!
      CMake is in the system path. Version:               cmake version 4.0.0

      CMake suite maintained and supported by Kitware (kitware.com/cmake).

      [stderr]
      CMake Error at CMakeLists.txt:5 (cmake_minimum_required):
        Compatibility with CMake < 3.5 has been removed from CMake.

        Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
        to tell CMake that the project requires at least <min> but has been updated
        to work with policies introduced by <max> or earlier.

        Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


      Traceback (most recent call last):
        File "<string>", line 14, in <module>
        File "C:\Users\Mi\AppData\Local\uv\cache\builds-v0\.tmp2sTMMi\lib\site-packages\setuptools\build_meta.py", line 334, in
      get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
        File "C:\Users\Mi\AppData\Local\uv\cache\builds-v0\.tmp2sTMMi\lib\site-packages\setuptools\build_meta.py", line 304, in
      _get_build_requires
          self.run_setup()
        File "C:\Users\Mi\AppData\Local\uv\cache\builds-v0\.tmp2sTMMi\lib\site-packages\setuptools\build_meta.py", line 320, in run
          exec(code, locals())
        File "<string>", line 109, in <module>
        File "C:\Users\Mi\AppData\Roaming\uv\python\cpython-3.10.16-windows-x86_64-none\lib\subprocess.py", line 457, in check_retu
          raise CalledProcessError(self.returncode, self.args, self.stdout,
      subprocess.CalledProcessError: Command '['cmake', '..', '-DHTS_ENGINE_INCLUDE_DIR=.', '-DHTS_ENGINE_LIB=dummy']' returned non
Resolved 1 package in 151ms
Prepared 1 package in 25ms
░░░░░░░░░░░░░░░░░░░░ [0/1] Installing wheels...
                warning: Failed to hardlink files; falling back to full copy. This may lead to degraded performance.
         If the cache and target directories are on different filesystems, hardlinking may not be supported.
         If this is intentional, set `export UV_LINK_MODE=copy` or use `--link-mode=copy` to suppress this warning.
Installed 1 package in 424ms
 + setuptools==78.1.0

错误的原因很简单,pyopenjtalk 在执行编译wheel文件时,用的cmake 版本是4.0,但是这个版本太高,不兼容该包定义的值。

注意,这个时候,即使你配置了其他低版本的cmake到环境变量中,setuptools也也不会去找它来编译。

解决方案:
step 1、将pyopenjtalk源码或者到pypi将产物下载下来,找到其中的cmakelist.txt文件,将他的最低版本直接改到3.5,如图:

在这里插入图片描述

cmake_minimum_required(VERSION 3.5)

# The name "HTSEngine" is used in the original makefile
# Due to historical reasons, let me use "hts_engine_API" instead first.
# we may want to use "HTSEngine" in the future.
# NOTE: we should use semanitc versioning. 1.09 -> 1.0.9!

step 2、通过修改后的源码安装

pip install pyopenjtalk-0.4.0

打完收功

相关文章:

  • 觉得自己做的网站土怎么办手机网页制作app
  • 做搜狗手机网站优化点今日新闻国内大事件
  • b2c电子商务模式的网站有哪些游戏推广怎么做
  • 重庆做网站电话怎么做网站平台
  • 温州网站建设方案维护南宁seo优化公司排名
  • wordpress 免费博客/seo优化费用
  • PHP泛型与集合的未来:从动态类型到强类型的演进
  • MFC中CMap类的用法和原理
  • 【机器人】复现 GraspNet 端到端抓取点估计 | PyTorch2.3 | CUDA12.1
  • c++的特性——多态
  • 服务热升级的方法
  • C++ 中的 decltype:从表达式中推断类型(二十八)
  • RK3588使用笔记:纯linux系统下基础功能配置(不定期更新)
  • MySQL内存管理机制详解
  • 【差分隐私相关概念】数据立方体(Data Cube)
  • C#里使用libxl的对齐/边框/颜色
  • 【极速版 -- 大模型入门到进阶】Transformer: Attention Is All You Need -- 第一弹
  • 基于python大数据的旅游可视化及推荐系统
  • JavaScript中var、let和const的区别
  • 深入理解分布式事务Saga,从入门到面试热点分析详解
  • 05-021-自考数据结构(20331)- 动态查找-例题分析
  • [首发]烽火HG680-KD-海思MV320芯片-2+8G-安卓9.0-强刷卡刷固件包
  • 计算机Python程序代码Java编写web系统c++代做qt设计接单php开发
  • 可发1区的超级创新思路(python\matlab实现):MPTS+Lconv+注意力集成机制的Transformer时间序列模型
  • 【Ollama】大模型运行框架
  • C++进阶——位图+布隆过滤器+海量数据处理