Skip to content

conda-lock missing xattr package as dependency #231948

@aphedges

Description

@aphedges

brew gist-logs <formula> link OR brew config AND brew doctor output

$ brew config
HOMEBREW_VERSION: 4.5.13
ORIGIN: https://github.com/Homebrew/brew
HEAD: 4d14be89e99a45181c18e96a5f19a5b43343cc0f
Last commit: 6 days ago
Branch: stable
Core tap JSON: 31 Jul 18:03 UTC
Core cask tap JSON: 31 Jul 18:03 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: vim
HOMEBREW_MAKE_JOBS: 14
Homebrew Ruby: 3.4.5 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.4.5/bin/ruby
CPU: 14-core 64-bit arm_palma
Clang: 17.0.0 build 1700
Git: 2.50.1 => /opt/homebrew/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 15.5-arm64
CLT: 16.4.0.0.1.1747106510
Xcode: N/A
Rosetta 2: false
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  [email protected]
  tldr

Warning: Putting non-prefixed coreutils in your path can cause GMP builds to fail.

Warning: Putting non-prefixed findutils in your path can cause python builds to fail.

Verification

  • My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.
  • My issue is not about a failure to build a formula from source.

What were you trying to do (and why)?

I was trying to run conda-lock.

What happened (include all command output)?

It failed, producing the following output:

$ conda-lock
Locking dependencies for ['osx-arm64']...
INFO:conda_lock.conda_solver:osx-arm64 using specs ['pip *']
INFO:virtualenv.discovery.builtin:find interpreter for spec PythonSpec(path=/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/bin/python)
INFO:virtualenv.discovery.builtin:proposed PythonInfo(spec=CPython3.13.5.final.0-64, system=/opt/homebrew/opt/[email protected]/bin/python3.13, exe=/opt/homebrew/Cellar/[email protected]/3.13.5/Frameworks/Python.framework/Versions/3.13/bin/python3.13, platform=darwin, version='3.13.5 (main, Jun 11 2025, 15:36:57) [Clang 17.0.0 (clang-1700.0.13.3)]', encoding_fs_io=utf-8-utf-8)
WARNING:virtualenv.seed.embed.base_embed:The --no-wheel and --wheel options are deprecated. They have no effect for Python > 3.8 as wheel is no longer bundled in virtualenv.
INFO:virtualenv.run.session:create virtual environment via CPython3macOsBrew(dest=/private/var/folders/pn/dly1wlvn51s4f4_8r7xv57vw0000gq/T/tmpu4aqi3e6/.venv, clear=False, no_vcs_ignore=False, global=False)
INFO:virtualenv.run.session:add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
Traceback (most recent call last):
  File "/opt/homebrew/bin/conda-lock", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/click/core.py", line 1442, in __call__
    return self.main(*args, **kwargs)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/click/core.py", line 1363, in main
    rv = self.invoke(ctx)
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/click/core.py", line 1830, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/click/core.py", line 1226, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/click/core.py", line 794, in invoke
    return callback(*args, **kwargs)
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/click/decorators.py", line 34, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/conda_lock.py", line 1494, in lock
    lock_func(filename_template=filename_template)
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/conda_lock.py", line 1202, in run_lock
    make_lock_files(
    ~~~~~~~~~~~~~~~^
        conda=_conda_exe,
        ^^^^^^^^^^^^^^^^^
    ...<16 lines>...
        mapping_url=mapping_url,
        ^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/conda_lock.py", line 434, in make_lock_files
    fresh_lock_content = create_lockfile_from_spec(
        conda=conda,
    ...<8 lines>...
        mapping_url=mapping_url,
    )
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/conda_lock.py", line 892, in create_lockfile_from_spec
    deps = _solve_for_arch(
        conda=conda,
    ...<7 lines>...
        mapping_url=mapping_url,
    )
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/conda_lock.py", line 821, in _solve_for_arch
    pip_deps = solve_pypi(
        pip_specs=requested_deps_by_name["pip"],
    ...<11 lines>...
        mapping_url=mapping_url,
    )
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/pypi_solver.py", line 599, in solve_pypi
    result = s.solve(use_latest=to_update)
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/_vendor/poetry/puzzle/solver.py", line 85, in solve
    packages = self._solve()
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/_vendor/poetry/puzzle/solver.py", line 166, in _solve
    result = resolve_version(self._package, self._provider)
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/_vendor/poetry/mixology/__init__.py", line 18, in resolve_version
    return solver.solve()
           ~~~~~~~~~~~~^^
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/_vendor/poetry/mixology/version_solver.py", line 174, in solve
    next = self._choose_package_version()
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/_vendor/poetry/mixology/version_solver.py", line 514, in _choose_package_version
    package = self._provider.complete_package(package)
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/_vendor/poetry/puzzle/provider.py", line 545, in complete_package
    self.search_for_direct_origin_dependency(dep)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/_vendor/poetry/puzzle/provider.py", line 218, in search_for_direct_origin_dependency
    package = self._search_for_vcs(dependency)
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/_vendor/poetry/puzzle/provider.py", line 293, in _search_for_vcs
    package = self._direct_origin.get_package_from_vcs(
        dependency.vcs,
    ...<6 lines>...
        or (self._env.path.joinpath("src") if self._env else None),
    )
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/_vendor/poetry/packages/direct_origin.py", line 116, in get_package_from_vcs
    return _get_package_from_git(
        url=url,
    ...<4 lines>...
        source_root=source_root,
    )
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/_vendor/poetry/packages/direct_origin.py", line 48, in _get_package_from_git
    package = DirectOrigin.get_package_from_directory(path)
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/_vendor/poetry/packages/direct_origin.py", line 80, in get_package_from_directory
    return PackageInfo.from_directory(path=directory).to_package(root_dir=directory)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/_vendor/poetry/inspection/info.py", line 462, in from_directory
    info = get_pep517_metadata(path)
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/_vendor/poetry/inspection/info.py", line 543, in get_pep517_metadata
    with isolated_builder(path, "wheel") as builder:
         ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.13.5/Frameworks/Python.framework/Versions/3.13/lib/python3.13/contextlib.py", line 141, in __enter__
    return next(self.gen)
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/_vendor/poetry/utils/isolated_build.py", line 180, in isolated_builder
    with ephemeral_environment(
         ~~~~~~~~~~~~~~~~~~~~~^
        executable=python_executable,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        flags={"no-pip": True},
        ^^^^^^^^^^^^^^^^^^^^^^^
    ) as venv:
    ^
  File "/opt/homebrew/Cellar/[email protected]/3.13.5/Frameworks/Python.framework/Versions/3.13/lib/python3.13/contextlib.py", line 141, in __enter__
    return next(self.gen)
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/_vendor/poetry/utils/env/__init__.py", line 47, in ephemeral_environment
    EnvManager.build_venv(
    ~~~~~~~~~~~~~~~~~~~~~^
        path=venv_dir,
        ^^^^^^^^^^^^^^
        executable=executable,
        ^^^^^^^^^^^^^^^^^^^^^^
        flags=flags,
        ^^^^^^^^^^^^
    )
    ^
  File "/opt/homebrew/Cellar/conda-lock/3.0.4/libexec/lib/python3.13/site-packages/conda_lock/_vendor/poetry/utils/env/env_manager.py", line 557, in build_venv
    import xattr
ModuleNotFoundError: No module named 'xattr'

What did you expect to happen?

I expected no exception to be thrown and for the command to complete successfully.

Step-by-step reproduction instructions (by running brew commands)

  1. Run brew install conda-lock

  2. Create an environment.yaml file with the following contents:

    channels:
      - conda-forge
    platforms:
      - osx-arm64
    dependencies:
      - pip:
          - mitmproxy @ git+https://[email protected]/mitmproxy/mitmproxy.git@main

    Note that removing @main from the end of final line produces a different error that appears to be unrelated.

  3. Run conda-lock


I encountered a similar problem in #218276, and I followed similar steps this time to fix it.

I ran the following command to install the package:

"$(brew --cellar conda-lock)"/*/libexec/bin/python -m pip install xattr

Afterwards, conda-lock started working.

Therefore, I feel that the problem is that xattr is not being properly included in the formula.

As further evidence, in a fresh conda-lock installation, see that xattr is stated as being required but not installed:

$ "$(brew --cellar conda-lock)"/*/libexec/bin/python -m pip check
conda-lock 3.0.4 requires xattr, which is not installed.

Here are some further notes:

Metadata

Metadata

Assignees

No one assigned

    Labels

    brewIssue may be Homebrew/brew relatedhelp wantedTask(s) needing PRs from the community or maintainers

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions