Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ferrarimarco opened this issue Jan 22, 2024 · 2 comments
Open

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

ferrarimarco opened this issue Jan 22, 2024 · 2 comments

Comments

@ferrarimarco
Copy link

ferrarimarco commented Jan 22, 2024

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!

@jackaypagegmail
Copy link

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

@jackaypagegmail
Copy link

[email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants