Skip to content

[BUG] Dependencies Installation Fails on macOS ARM64 due to Incompatible decord Package #1057

@qianhaiyang

Description

@qianhaiyang

是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?

  • 我已经搜索过已有的issues和讨论 | I have searched the existing issues / discussions

该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?

  • 我已经搜索过FAQ | I have searched FAQ

当前行为 | Current Behavior

Dependencies Installation Fails on macOS ARM64 due to Incompatible decord Package

Description

When attempting to install project dependencies using uv add, the installation fails because the decord==0.6.0 package does not have wheel distributions compatible with macOS ARM64 architecture.

Environment

  • OS: macOS
  • Architecture: ARM64 (M-series chip, macosx_26_0_arm64)
  • Package Manager: uv

Reproduction Steps

  1. Run the following command:
uv add "transformers==4.51.0" accelerate "torch>=2.3.0,<=2.8.0" "torchaudio<=2.8.0" "minicpmo-utils[all]>=1.0.2"

Error Message

error: Distribution `decord==0.6.0 @ registry+http://mirrors.aliyun.com/pypi/simple/` can't be installed because it doesn't have a source distribution or wheel for the current platform                                                        
hint: You're on macOS (`macosx_26_0_arm64`), but `decord` (v0.6.0) only has wheels for the following platforms: `manylinux2010_x86_64`, `win_amd64`

Root Cause

The decord==0.6.0 package (likely a transitive dependency) only provides pre-built wheels for:

  • Linux (manylinux2010_x86_64)
  • Windows (win_amd64)

But not for macOS ARM64.

Suggested Solutions

  1. Add platform constraints to pyproject.toml to specify required environments
  2. Find and remove the dependency chain that requires decord if it's not needed
  3. Use an alternative package that provides macOS ARM64 support
  4. Build from source if available (may require additional build tools)

Additional Context

The error suggests adding the following to tool.uv.required-environments in pyproject.toml:

[tool.uv]
required-environments = ["sys_platform == 'darwin' and platform_machine == 'arm64'"]

This would allow uv to resolve to compatible versions for the ARM64 platform.

期望行为 | Expected Behavior

No response

复现方法 | Steps To Reproduce

No response

运行环境 | Environment

- OS:
- Python:
- Transformers:
- PyTorch:
- CUDA (`python -c 'import torch; print(torch.version.cuda)'`):

备注 | Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions