I am currently facing a really frustrating problem with installing tensorflow federated. I am on M2 Macbook Air, using virtual env, no conda.
I was following this tutorial, and did the following:
- Created a new folder
- Set the local Python versoion to: pyenv local 3.13.2
- Created a new environment with: python -m venv tff-venv
- Upgraded pip with: pip install --upgrade "pip"
- Tried to install tensorflow federated with: pip install --upgrade tensorflow-federated
I got this error:
Collecting absl-py~=0.9.0 (from tensorflow-federated)
Using cached absl-py-0.9.0.tar.gz (104 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
....
....
File "<string>", line 34, in <module>
RuntimeError: Python version 2.7 or 3.4+ is required.
[end of output]
After that I googled a bit, and found out that the package apparently thinks that python 3.13 is less than 3.4, because it compares string.
Thus, I deleted the venv, and then set the local python version to 3.9.15 (Step 2) and followed the rest of the steps. However, I again got an error while trying to pip install tensorflow-federated:
...
ModuleNotFoundError: No module named 'distutils.msvccompiler'
...
Thus, I am bit stuck as I have no clue what could be wrong and how I could fix it. I would be grateful for any help!
I am currently facing a really frustrating problem with installing tensorflow federated. I am on M2 Macbook Air, using virtual env, no conda.
I was following this tutorial, and did the following:
- Created a new folder
- Set the local Python versoion to: pyenv local 3.13.2
- Created a new environment with: python -m venv tff-venv
- Upgraded pip with: pip install --upgrade "pip"
- Tried to install tensorflow federated with: pip install --upgrade tensorflow-federated
I got this error:
Collecting absl-py~=0.9.0 (from tensorflow-federated)
Using cached absl-py-0.9.0.tar.gz (104 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
....
....
File "<string>", line 34, in <module>
RuntimeError: Python version 2.7 or 3.4+ is required.
[end of output]
After that I googled a bit, and found out that the package apparently thinks that python 3.13 is less than 3.4, because it compares string.
Thus, I deleted the venv, and then set the local python version to 3.9.15 (Step 2) and followed the rest of the steps. However, I again got an error while trying to pip install tensorflow-federated:
...
ModuleNotFoundError: No module named 'distutils.msvccompiler'
...
Thus, I am bit stuck as I have no clue what could be wrong and how I could fix it. I would be grateful for any help!
Share Improve this question asked 21 hours ago ricky11ricky11 669 bronze badges1 Answer
Reset to default 0tensorflow-federated only supports POSIX :: Linux Operating System. There's no support for macOS as it only has wheels for Linux.