Skip to content

Cannot install from pip due to conflicting absl-py dependency #13

@ferrarimarco

Description

@ferrarimarco

Hi folks!

When installing the latest available commit in this repository (8d4b013673f87ccd35c9ec95a97749a5ff83f467), I get the following dependency conflict error:

ERROR: Cannot install -r requirements.txt (line 27), -r requirements.txt (line 28) and absl-py==2.* and >=2.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested absl-py==2.* and >=2.0
    tensorflow 2.14.0 depends on absl-py>=1.0.0
    tensorflow-federated 0.68.0 depends on absl-py==1.* and >=1.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

This happens both on a x86_64 Linux with Ubuntu 22.04, and on a M1 macOS

To reproduce, from your shell (I tested with Docker):

  1. Run a container to isolate the environment: docker run --rm -it ubuntu:22.04
  2. Update package repo: apt update
  3. Install build dependencies and cURL: apt install -y git gcc python3 python3-dev python3-venv curl
  4. Install bazelisk: curl --output /usr/local/bin/bazelisk-linux-amd64 https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-amd64
  5. Make bazelisk executable: chmod a+x /usr/local/bin/bazelisk-linux-amd64
  6. Create a venv: python3 -m venv venv
  7. Activate the venv: source venv/bin/activate
  8. Update pip: pip install --upgrade pip
  9. Clone the federated-compute repository: git clone https://github.com/google/federated-compute.git
  10. Change the working directory: cd federated-compute
  11. Install federated-compute: pip install -r requirements.txt

Thanks for your support!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions