You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Mac M1执行pip install mlfoundry时fastparquet构建wheel失败报错

问题场景

在搭载M1系列芯片的Mac笔记本上安装TrueFoundry实验追踪库mlfoundry,执行安装命令pip install mlfoundry时抛出构建错误,核心报错信息如下:

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for fastparquet
Running setup.py clean for fastparquet
error: subprocess-exited-with-error

× python setup.py clean did not run successfully.
│ exit code: 1
╰─> [30 lines of output]
/Users/sohan04/work/venv/lib/python3.8/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.

报错指向fastparquet依赖的wheel包构建失败,python setup.py clean进程异常退出(退出码1),同时伴随setuptools相关接口弃用警告。

故障原因
  • 报错提示的“问题源自子进程而非pip本身”是pip的通用异常提示,实际故障点为fastparquet依赖的安装流程异常
  • M1(arm64)架构下,低版本fastparquet没有提供官方预编译的wheel安装包,pip会自动拉取源码在本地编译
  • 本地虚拟环境使用的Python 3.8版本、旧版setuptools构建工具和fastparquet源码编译流程存在兼容性问题,触发了已废弃的setuptools.installer接口调用,最终导致编译进程异常退出
解决方法

按顺序执行以下操作即可完成安装:

  • 先升级基础构建工具到最新版本,执行命令:
    pip install --upgrade pip setuptools wheel
    
  • 提前安装适配M1芯片的fastparquet版本,避免安装mlfoundry时触发源码编译:
    • 如果使用conda管理虚拟环境,执行:
      conda install -c conda-forge fastparquet
      
    • 如果只用pip管理环境,直接安装带arm64预编译包的fastparquet正式版本:
      pip install fastparquet>=2022.12.0
      
  • 确认fastparquet安装无报错后,重新执行mlfoundry安装命令即可:
    pip install mlfoundry
    

补充说明:Python 3.8版本对M1芯片的适配性较差,多数数据科学类依赖已经停止为Python 3.8提供arm64架构预编译包,长期使用建议升级虚拟环境到Python 3.9及以上版本,可以大幅减少同类源码编译报错。

内容的提问来源于stack exchange,提问作者Sohan Bansal

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.29 20:30:45