Skip to content

Don't try to install dev requirements --system wide #4712

@david-stanley-94

Description

@david-stanley-94

Description

  • The make install-test-requirements command breaks for me when it tries to install system-wide
  • There is a --system flag on the make command causing the issue
  • This is a command called per the Guidelines for contributing developers (https://github.com/kedro-org/kedro/wiki/Guidelines-for-contributing-developers/)
  • Removing the --system flag from the make command and rerunning, fixes the issue for me

Context

  • Prevents install of test requirements (though easily bypassed)

Steps to Reproduce

Undoubtedly system dependent, but for me:

  1. Clone repo
  2. Activate venv
  3. Call make install-test-requirements

Expected Result

The test requirements should install to the venv

Actual Result

I get this error from the line of the make command uv pip install --system "kedro[test] @ .":

uv pip install --system "kedro[test] @ ."
Using Python 3.13.1 environment at /opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13
error: The interpreter at /opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13 is externally managed, and indicates the following:

  To install Python packages system-wide, try brew install
  xyz, where xyz is the package you are trying to
  install.

  If you wish to install a Python library that isn't in Homebrew,
  use a virtual environment:

  python3 -m venv path/to/venv
  source path/to/venv/bin/activate
  python3 -m pip install xyz

  If you wish to install a Python application that isn't in Homebrew,
  it may be easiest to use 'pipx install xyz', which will manage a
  virtual environment for you. You can install pipx with

  brew install pipx

  You may restore the old behavior of pip by passing
  the '--break-system-packages' flag to pip, or by adding
  'break-system-packages = true' to your pip.conf file. The latter
  will permanently disable this error.

  If you disable this error, we STRONGLY recommend that you additionally
  pass the '--user' flag to pip, or set 'user = true' in your pip.conf
  file. Failure to do this can result in a broken Homebrew installation.

  Read more about this behavior here: <https://peps.python.org/pep-0668/>

Consider creating a virtual environment with `uv venv`.
make: *** [install-test-requirements] Error 2

Your Environment

  • Kedro version used (pip show kedro or kedro -V): 0.19.12
  • Python version used (python -V): 3.11.11
  • Operating system and version: macOS, 15.4.1 (24E263)

Metadata

Metadata

Assignees

No one assigned

    Labels

    CommunityIssue/PR opened by the open-source community

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions