windows10 pip安装ete4报错

**ete4(Environment for Tree Exploration v4)**是生物信息学领域核心的Python库,专注于系统发育树(进化树)的构建、操作、可视化及分析,广泛应用于进化生物学、生态学、流行病学、基因组学等研究场景。

windows10 pip安装ete3可以,安装ete4就不行,报错信息:

复制代码
pip install ete4
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting ete4
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/fa/53/0ceedd63e4c872f668188a5de786a00b6b8854cb285a3dc69cd107c62038/ete4-4.4.0.tar.gz (1.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [34 lines of output]
     
      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      """
      ^
      ------------------------------------------------------------
      ete4\core\operations.pyx:1:0: 'ete4\core\operations' is not a valid module name
      Compiling ete4\core\operations.pyx because it changed.
      Compiling ete4\core\tree.pyx because it changed. 
      Compiling ete4\parser\newick.pyx because it changed.
      [1/3] Cythonizing ete4\core\operations.pyx       
      Traceback (most recent call last):
        File "G:\comatespec\lingjingchong\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 389, in <module>
          main()
        File "G:\comatespec\lingjingchong\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "G:\comatespec\lingjingchong\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 143, in get_requires_for_build_wheel 
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-3y9j6ica\overlay\Lib\site-packages\setuptools\build_meta.py", line 333, in get_requires_for_build_wheel          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-3y9j6ica\overlay\Lib\site-packages\setuptools\build_meta.py", line 301, in _get_build_requires
          self.run_setup()
        File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-3y9j6ica\overlay\Lib\site-packages\setuptools\build_meta.py", line 317, in run_setup
          exec(code, locals())
        File "<string>", line 29, in <module>
        File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-3y9j6ica\overlay\Lib\site-packages\Cython\Build\Dependencies.py", line 1153, in cythonize
          cythonize_one(*args)
        File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-3y9j6ica\overlay\Lib\site-packages\Cython\Build\Dependencies.py", line 1297, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: ete4\core\operations.pyx
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed to build 'ete4' when getting requirements to build wheel

AI教给个方法,使用预编译版本安装,一次就过了!

复制代码
pip install --only-binary=ete4 ete4

输出信息

复制代码
(.venv) PS G:\traework\medai\acnes_amp_design> pip install --only-binary=ete4 ete4
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting ete4
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f7/5a/af998ea73723e666e2b339694221ca24bcce5cae3913bed261752adecd02/ete4-4.0.0-py3-none-any.whl (1.6 MB)    
Collecting bottle (from ete4)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/83/f6/b55ec74cfe68c6584163faa311503c20b0da4c09883a41e8e00d6726c954/bottle-0.13.4-py2.py3-none-any.whl (103 
kB)
Collecting brotli (from ete4)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/1c/4e/bc1dcac9498859d5e353c9b153627a3752868a9d5f05ce8dedd81a2354ab/brotli-1.2.0-cp312-cp312-win_amd64.whl (369 kB)
Requirement already satisfied: numpy in G:\comatespec\lingjingchong\.venv\Lib\site-packages (from ete4) (1.26.4)
Requirement already satisfied: scipy in G:\comatespec\lingjingchong\.venv\Lib\site-packages (from ete4) (1.16.3)
Requirement already satisfied: requests in G:\comatespec\lingjingchong\.venv\Lib\site-packages (from ete4) (2.31.0)
Requirement already satisfied: charset-normalizer<4,>=2 in G:\comatespec\lingjingchong\.venv\Lib\site-packages (from requests->ete4) (3.4.4)
Requirement already satisfied: idna<4,>=2.5 in G:\comatespec\lingjingchong\.venv\Lib\site-packages (from requests->ete4) (3.11)
Requirement already satisfied: urllib3<3,>=1.21.1 in G:\comatespec\lingjingchong\.venv\Lib\site-packages (from requests->ete4) (2.6.3)
Requirement already satisfied: certifi>=2017.4.17 in G:\comatespec\lingjingchong\.venv\Lib\site-packages (from requests->ete4) (2025.11.12)
Installing collected packages: brotli, bottle, ete4
Successfully installed bottle-0.13.4 brotli-1.2.0 ete4-4.0.0

问题解决!

相关推荐
卷无止境1 分钟前
Python 异常处理:从入门到工程实践
后端·python
garuda herb4 分钟前
生成专题页Blog--建立并返回 MySQL 数据库连接
python·mysql
ONE_SIX_MIX8 分钟前
qwenpaw-plugin-file-tools QwenPaw增强文件工具 更新 v1.1.1
python·qwenpaw
AOwhisky11 分钟前
Python 学习笔记(第五期)——组合数据类型:列表、元组、集合与字典精讲——核心知识点自测与详解
开发语言·笔记·python·学习·云计算
码农学院30 分钟前
GEO与SEO协同:从传统搜索到生成式搜索的平滑迁移路径
服务器·前端·python
程序员羽痕30 分钟前
基于 Django + PyTorch 的中文字体识别系统
pytorch·python·django
灯澜忆梦9 小时前
GO_并发编程---定时器
开发语言·后端·golang
-银雾鸢尾-10 小时前
C#中的StringBuilder相关方法
开发语言·c#
-银雾鸢尾-10 小时前
C#中结构体与类的区别;抽象类与接口的区别
开发语言·c#
大模型码小白11 小时前
【Python零基础教程】继承、多态与魔法函数:面向对象编程三大核心特性详解
java·大数据·开发语言·人工智能·python·ai编程