Skip to content

[Bug] Installation fails on Linux due to macOS-specific dependency (pyobjc-framework-Quartz) #19

Description

@CongJie-Pan

Describe the bug

When attempting to install the gum package on a Linux environment (Ubuntu) using pip install git+https://github.com/GeneralUserModels/gum.git, the installation fails.

The error occurs because the setup configuration strictly depends on pyobjc-framework-Quartz, which is a macOS-only library. This causes the installer to look for the /usr/bin/sw_vers command, leading to a FileNotFoundError.

To Reproduce

  1. Use a Linux machine (e.g., Ubuntu).
  2. Run the command: pip install git+https://github.com/GeneralUserModels/gum.git
  3. See error.

Error Output

Getting requirements to build wheel ... error
error: subprocess-exited-with-error

subprocess.check_output(["/usr/bin/sw_vers", "-productVersion"])
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/sw_vers'

Expected behavior

The package should install successfully on Linux. The pyobjc dependency should ideally be conditionally required only for macOS environments (e.g., pyobjc-framework-Quartz; sys_platform == 'darwin').

Workaround Used

I was able to successfully install the package by cloning the repository and manually removing pyobjc from the dependency files (pyproject.toml / setup.py) before running pip install -e ..

Environment

  • OS: Linux (Ubuntu)
  • Python Version: 3.11 (or specify your exact version)

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