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

tensorflow federated installation #4022

Open
garytann opened this issue Jul 5, 2023 · 12 comments
Open

tensorflow federated installation #4022

garytann opened this issue Jul 5, 2023 · 12 comments
Labels
bug Something isn't working

Comments

@garytann
Copy link

garytann commented Jul 5, 2023

Describe the bug
A clear and concise description of what the bug is. It is often helpful to
provide a link to a colab notebook that
reproduces the bug.

Environment (please complete the following information):

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Mac OS M1 ARM
  • Python package versions (e.g., TensorFlow Federated, TensorFlow): NIL
  • Python version: 3.9/3.10
  • Bazel version (if building from source): NIL
  • CUDA/cuDNN version: NIL
  • What TensorFlow Federated execution stack are you using? NIL

Note: You can collect the Python package information by running pip3 freeze
from the command line and most of the other information can be collected using
TensorFlows environment capture
script.

Expected behavior
I am trying to install tensorflow federated, however I am facing alot of deps issue. I have tried referencing to the solution provided in https://github.com/tensorflow/federated/issues/1254 however, it might have been outdated I presumed? and I am unable to install the libraries properly. Would appreciate if someone can offer some assistance.

Additional context
Add any other context about the problem here.

@garytann garytann added the bug Something isn't working label Jul 5, 2023
@BPDanek
Copy link

BPDanek commented Jul 7, 2023

I am experiencing the same issue.
Python 3.10.11
$ pip install --upgrade tensorflow-federated
returns

Collecting absl-py~=0.9.0 (from tensorflow-federated)
  Using cached absl-py-0.9.0.tar.gz (104 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/z7/3z1ynh754yddqxjrz2zz7d2c0000gn/T/pip-install-_0mp412x/absl-py_355d552765c14a67af708cc9f2df9553/setup.py", line 34, in <module>
          raise RuntimeError('Python version 2.7 or 3.4+ is required.')
      RuntimeError: Python version 2.7 or 3.4+ is required.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

@BPDanek
Copy link

BPDanek commented Jul 7, 2023

similar issue: #3928

@BPDanek
Copy link

BPDanek commented Jul 7, 2023

The issue appears to be that we are running this on macOS: #3881

@BPDanek
Copy link

BPDanek commented Jul 7, 2023

pip install tensorflow-federated==0.60.0             
ERROR: Ignored the following versions that require a different python version: 0.34.0 Requires-Python ~=3.9.0; 0.36.0 Requires-Python ~=3.9.0
ERROR: Could not find a version that satisfies the requirement tensorflow-federated==0.60.0 (from versions: 0.1.0, 0.2.0, 0.3.0, 0.4.0, 0.5.0, 0.6.0, 0.7.0, 0.9.0, 0.10.0, 0.10.1, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.15.0, 0.16.0, 0.16.1, 0.17.0, 0.18.0, 0.19.0, 0.20.0, 0.21.0, 0.22.0, 0.23.0, 0.24.0, 0.26.0, 0.27.0, 0.28.0, 0.29.0, 0.30.0, 0.31.0, 0.32.0, 0.33.0, 0.37.0, 0.38.0, 0.39.0, 0.40.0, 0.41.0, 0.42.0, 0.43.0, 0.44.0, 0.45.0, 0.46.0, 0.47.0, 0.48.0)
ERROR: No matching distribution found for tensorflow-federated==0.60.0

@user777917
Copy link

I have the same problem. Trying to install tensorflow federated on Pyhton3.9/ from the last few days but no success. I tried downgrading tensorflow version to 2.5 with python 3.9 but same problem.

@BPDanek
Copy link

BPDanek commented Jul 15, 2023

You will not be able to run this on mac. You need to run it in collab or a linux backend.

@ulftietze
Copy link

Downgrade your Python version to Python 3.9 and you are good to go. Sucks a bit, but tensorflow-federated needs to update the absl-py package version.

This is a bug in [one of the libraries]. The required release number absl-py~=0.9.0 does Python version comparison like this way in the abseil-py package. The comparison worked just fine for Pythons up to 3.9 but fails with 3.10+. When py_version is ('3', '10') the comparison returns False because in Python '10' is less then '4'; for strings Python compares '1' and '4'. (Integer 10 is of course > 4).

This means that for now you can only use with Python 2.7 and 3.5-3.9 but not with 3.10+.

Source: https://stackoverflow.com/a/75250610

@aramasethu
Copy link

I am still facing issues while installing in Mac OS even after downgrading. Is there any way to solve this?

@evgri243
Copy link

evgri243 commented Nov 8, 2023

@aramasethu, I have just raised a PR #4270 with macOS (M1-M2) build configuration (originally started for my own needs). You may give it a try, follow the installation instructions from the PR.

Let me know if you find any issues or something not working out of the box.

Please keep in mind that you should still build TensorFlow Text and TensorFlow Compression and install them manually into the environment as they still don't provide prebuilt packages, and otherwise installation will fail with unsatisfied dependencies.

@ElnathanTiokou
Copy link

Hi I am also facing the very same issue, but with Windows OS, having the 3.9 Py --version. It's not leading anywhere,

@stefankem
Copy link

similar issues in #4368

@Rahulraj0308
Copy link

Hey,@BPDanek ...
you need to install Tensorflow federated learning version 0.20.0
!pip install --quiet tensorflow-federated==0.20.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants