I´m trying to install Tensorflow Federated by running pip install tensorflow-federated in a new Anaconda environment with Python 3.11 in Windows but it gives me this error:
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 "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-k_gm1isk\absl-py_2a985a0a199a4b93b9e364bfe5d6f101\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.
I´ve tried to install it in other versions of python but it only works on Python 3.8 and at that point some versions of libraries are to old to work and comes up with compatability issues.
Would appreciate some help!
And thanks for your time!
tensorflow-federated
is not supported on windows, see https://github.com/tensorflow/federated/issues/4207:and https://github.com/tensorflow/federated/issues/779
What happens in your case is that
pip
goes back to older and older versions of tensorflow-federated that did not explicitly state that they are not for windows and then fails fortensorflow_federated-0.17
when it is trying to build the dependencyabsl-py-0.9.0.tar.gz
. In itssetup.py
, this package has the version check implemented aswhich did work for python versions <3.10 but fails as the string comparison of
'10'
and'4'
evaluates to '10' < '4'`, hecne the error message that the python version is too lowYour solution here:
As mentioned in the quote from github, use a linux system through virtualization, docker, wsl or dual-boot