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

Installation failed #4368

Closed
robertwt7 opened this issue Dec 13, 2023 · 10 comments
Closed

Installation failed #4368

robertwt7 opened this issue Dec 13, 2023 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@robertwt7
Copy link

Describe the bug
running pipenv install tensorflow-federated or pip install tensorflow-federated fails with python 3.9 and 3.10

Environment (please complete the following information):

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): MacOS Sonoma & WSL Ubuntu 20
  • Python package versions (e.g., TensorFlow Federated, TensorFlow): tensorflow federated
  • Python version: 3.9, 3.10
  • CUDA/cuDNN version:
  • What TensorFlow Federated execution stack are you using? both not sure

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
To install properly from fresh project

Additional context

❯ pipenv --python 3.9
Virtualenv already exists!
Removing existing virtualenv...
Creating a virtualenv for this project...
Pipfile: /Users/rtirtasentana/Documents/personal/federatedlearning/Pipfile
Using /opt/homebrew/bin/python3.9 (3.9.18) to create virtualenv...
⠸ Creating virtual environment...created virtual environment CPython3.9.18.final.0-64 in 234ms
  creator CPython3Posix(dest=/Users/rtirtasentana/Documents/personal/federatedlearning/.venv, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/rtirtasentana/Library/Application Support/virtualenv)
    added seed packages: pip==22.0.3, setuptools==60.6.0, wheel==0.37.1
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

✔ Successfully created virtual environment!
Virtualenv location: /Users/rtirtasentana/Documents/personal/federatedlearning/.venv
Creating a Pipfile for this project...
❯ pipenv shell
Launching subshell in virtual environment...
 . /Users/rtirtasentana/Documents/personal/federatedlearning/.venv/bin/activate
❯  . /Users/rtirtasentana/Documents/personal/federatedlearning/.venv/bin/activate
❯ which python
/Users/rtirtasentana/Documents/personal/federatedlearning/.venv/bin/python
❯ python --version
Python 3.9.18
❯ pipenv install tensorflow-federated
Installing tensorflow-federated...
Error:  An error occurred while installing tensorflow-federated!
Error text: Collecting tensorflow-federated
  Using cached tensorflow_federated-0.48.0-py2.py3-none-any.whl (42.8 MB)
Collecting pytype==2022.12.15
  Using cached pytype-2022.12.15.tar.gz (1.9 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting jax==0.3.14
  Downloading jax-0.3.14.tar.gz (990 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 990.1/990.1 KB 5.2 MB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting absl-py==1.*,>=1.0
  Using cached absl_py-1.4.0-py3-none-any.whl (126 kB)
Collecting typing-extensions~=4.4.0
  Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Collecting cachetools~=3.1
  Using cached cachetools-3.1.1-py2.py3-none-any.whl (11 kB)
Collecting tensorflow-model-optimization==0.7.3
  Using cached tensorflow_model_optimization-0.7.3-py2.py3-none-any.whl (238 kB)
Collecting tensorflow-federated
  Using cached tensorflow_federated-0.47.0-py2.py3-none-any.whl (42.8 MB)
Collecting tqdm~=4.64
  Using cached tqdm-4.66.1-py3-none-any.whl (78 kB)
Collecting tensorflow-federated
  Using cached tensorflow_federated-0.46.0-py2.py3-none-any.whl (42.8 MB)
  Using cached tensorflow_federated-0.45.0-py2.py3-none-any.whl (42.8 MB)
  Using cached tensorflow_federated-0.44.0-py2.py3-none-any.whl (42.9 MB)
  Using cached tensorflow_federated-0.43.0-py2.py3-none-any.whl (42.6 MB)
  Using cached tensorflow_federated-0.42.0-py2.py3-none-any.whl (42.5 MB)
  Using cached tensorflow_federated-0.41.0-py2.py3-none-any.whl (42.4 MB)
  Using cached tensorflow_federated-0.40.0-py2.py3-none-any.whl (913 kB)
  Using cached tensorflow_federated-0.39.0-py2.py3-none-any.whl (912 kB)
  Using cached tensorflow_federated-0.38.0-py2.py3-none-any.whl (906 kB)
  Using cached tensorflow_federated-0.37.0-py2.py3-none-any.whl (903 kB)
  Using cached tensorflow_federated-0.36.0-py2.py3-none-any.whl (900 kB)
Collecting jax==0.3.13
  Using cached jax-0.3.13.tar.gz (951 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting dm-tree==0.1.7
  Using cached dm_tree-0.1.7-cp39-cp39-macosx_11_0_arm64.whl (105 kB)
Collecting tensorflow-federated
  Using cached tensorflow_federated-0.34.0-py2.py3-none-any.whl (886 kB)
  Using cached tensorflow_federated-0.33.0-py2.py3-none-any.whl (885 kB)
Collecting tensorflow-model-optimization~=0.7.2
  Using cached tensorflow_model_optimization-0.7.5-py2.py3-none-any.whl (241 kB)
Collecting tensorflow-privacy~=0.8.1
  Using cached tensorflow_privacy-0.8.12-py3-none-any.whl (405 kB)
Collecting absl-py~=1.0.0
  Using cached absl_py-1.0.0-py3-none-any.whl (126 kB)
Collecting numpy~=1.21.4
  Using cached numpy-1.21.6-cp39-cp39-macosx_11_0_arm64.whl (12.4 MB)
Collecting grpcio~=1.46.3
  Using cached grpcio-1.46.5.tar.gz (21.8 MB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting semantic-version~=2.6.0
  Using cached semantic_version-2.6.0-py3-none-any.whl (14 kB)
Collecting portpicker~=1.5.2
  Using cached portpicker-1.5.2-py3-none-any.whl (14 kB)
Collecting attrs~=21.4.0
  Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
Collecting tensorflow-federated
  Using cached tensorflow_federated-0.32.0-py2.py3-none-any.whl (884 kB)
  Using cached tensorflow_federated-0.31.0-py2.py3-none-any.whl (884 kB)
  Using cached tensorflow_federated-0.30.0-py2.py3-none-any.whl (875 kB)
  Using cached tensorflow_federated-0.29.0-py2.py3-none-any.whl (867 kB)
  Using cached tensorflow_federated-0.28.0-py2.py3-none-any.whl (859 kB)
  Using cached tensorflow_federated-0.27.0-py2.py3-none-any.whl (861 kB)
Collecting tqdm~=4.28.1
  Using cached tqdm-4.28.1-py2.py3-none-any.whl (45 kB)
Collecting jax~=0.2.27
  Using cached jax-0.2.28.tar.gz (887 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting grpcio~=1.34.0
  Using cached grpcio-1.34.1.tar.gz (21.1 MB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting semantic-version~=2.8.5
  Using cached semantic_version-2.8.5-py2.py3-none-any.whl (15 kB)
Collecting attrs~=21.2.0
  Using cached attrs-21.2.0-py2.py3-none-any.whl (53 kB)
Collecting portpicker~=1.3.1
  Using cached portpicker-1.3.9-py3-none-any.whl (13 kB)
Collecting farmhashpy~=0.4.0
  Using cached farmhashpy-0.4.0.tar.gz (98 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting dm-tree~=0.1.1
  Using cached dm_tree-0.1.8-cp39-cp39-macosx_11_0_arm64.whl (110 kB)
Collecting tensorflow-federated
  Using cached tensorflow_federated-0.26.0-py2.py3-none-any.whl (862 kB)
  Using cached tensorflow_federated-0.24.0-py2.py3-none-any.whl (866 kB)
  Using cached tensorflow_federated-0.23.0-py2.py3-none-any.whl (866 kB)
  Using cached tensorflow_federated-0.22.0-py2.py3-none-any.whl (863 kB)
  Using cached tensorflow_federated-0.21.0-py2.py3-none-any.whl (857 kB)
  Using cached tensorflow_federated-0.20.0-py2.py3-none-any.whl (819 kB)
  Using cached tensorflow_federated-0.19.0-py2.py3-none-any.whl (602 kB)
Collecting numpy~=1.19.2
  Using cached numpy-1.19.5.zip (7.3 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting tensorflow-privacy~=0.5.0
  Downloading tensorflow_privacy-0.5.2-py3-none-any.whl (192 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 192.6/192.6 KB 4.5 MB/s eta 0:00:00
Collecting retrying~=1.3.3
  Downloading retrying-1.3.4-py3-none-any.whl (11 kB)
Collecting tensorflow-federated
  Using cached tensorflow_federated-0.18.0-py2.py3-none-any.whl (578 kB)
Collecting h5py~=2.10.0
  Using cached h5py-2.10.0.tar.gz (301 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting tensorflow-federated
  Using cached tensorflow_federated-0.17.0-py2.py3-none-any.whl (517 kB)
  Using cached tensorflow_federated-0.16.1-py2.py3-none-any.whl (475 kB)
Collecting absl-py~=0.9.0
  Using cached absl-py-0.9.0.tar.gz (104 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting numpy~=1.18.4
  Using cached numpy-1.18.5.zip (5.4 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'error'

  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [54 lines of output]
      Running from numpy source directory.
      <string>:461: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
      /private/var/folders/xv/z28qhj994ps_yzb343ss5j0c0000gn/T/pip-install-1gpm0oxl/numpy_af6c2be632db442db5bb8991e41cdf53/tools/cythonize.py:75: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
        required_version = LooseVersion('0.29.14')
      /private/var/folders/xv/z28qhj994ps_yzb343ss5j0c0000gn/T/pip-install-1gpm0oxl/numpy_af6c2be632db442db5bb8991e41cdf53/tools/cythonize.py:77: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
        if LooseVersion(cython_version) < required_version:

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
                  self.rng_state.ctr.v[i] = counter[i]

              self._reset_state_variables()

              self._bitgen.state = <void *>&self.rng_state
              self._bitgen.next_uint64 = &philox_uint64
                                         ^
      ------------------------------------------------------------

      _philox.pyx:195:35: Cannot assign type 'uint64_t (*)(void *) except? -1 nogil' to 'uint64_t (*)(void *) noexcept nogil'. Exception values are incompatible. Suggest adding 'noexcept' to type 'uint64_t (void *) except? -1 nogil'.
      Processing numpy/random/_bounded_integers.pxd.in
      Processing numpy/random/_philox.pyx
      Traceback (most recent call last):
        File "/private/var/folders/xv/z28qhj994ps_yzb343ss5j0c0000gn/T/pip-install-1gpm0oxl/numpy_af6c2be632db442db5bb8991e41cdf53/tools/cythonize.py", line 238, in <module>
          main()
        File "/private/var/folders/xv/z28qhj994ps_yzb343ss5j0c0000gn/T/pip-install-1gpm0oxl/numpy_af6c2be632db442db5bb8991e41cdf53/tools/cythonize.py", line 234, in main
          find_process_files(root_dir)
        File "/private/var/folders/xv/z28qhj994ps_yzb343ss5j0c0000gn/T/pip-install-1gpm0oxl/numpy_af6c2be632db442db5bb8991e41cdf53/tools/cythonize.py", line 225, in find_process_files
          process(root_dir, fromfile, tofile, function, hash_db)
        File "/private/var/folders/xv/z28qhj994ps_yzb343ss5j0c0000gn/T/pip-install-1gpm0oxl/numpy_af6c2be632db442db5bb8991e41cdf53/tools/cythonize.py", line 191, in process
          processor_function(fromfile, tofile)
        File "/private/var/folders/xv/z28qhj994ps_yzb343ss5j0c0000gn/T/pip-install-1gpm0oxl/numpy_af6c2be632db442db5bb8991e41cdf53/tools/cythonize.py", line 80, in process_pyx
          subprocess.check_call(
        File "/opt/homebrew/Cellar/python@3.9/3.9.18/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/Users/rtirtasentana/Documents/personal/federatedlearning/.venv/bin/python', '-m', 'cython', '-3', '--fast-fail', '-o', '_philox.c', '_philox.pyx']' returned non-zero exit status 1.
      Cythonizing sources
      Traceback (most recent call last):
        File "/Users/rtirtasentana/Documents/personal/federatedlearning/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/Users/rtirtasentana/Documents/personal/federatedlearning/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Users/rtirtasentana/Documents/personal/federatedlearning/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "/private/var/folders/xv/z28qhj994ps_yzb343ss5j0c0000gn/T/pip-build-env-e7e2t8jx/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 366, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/private/var/folders/xv/z28qhj994ps_yzb343ss5j0c0000gn/T/pip-build-env-e7e2t8jx/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 480, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/private/var/folders/xv/z28qhj994ps_yzb343ss5j0c0000gn/T/pip-build-env-e7e2t8jx/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 488, in <module>
        File "<string>", line 469, in setup_package
        File "<string>", line 275, in generate_cython
      RuntimeError: Running cythonize failed!
      [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.

✘ Installation Failed
@robertwt7 robertwt7 added the bug Something isn't working label Dec 13, 2023
@robertwt7
Copy link
Author

even with fresh pip without pipenv it also fails, note that i am using python 3.9 because python 3.10+ has error with abseil package:

❯ which python
/Users/rtirtasentana/Documents/repos/federatedlearning/venv/bin/python
❯ pip install --upgrade pip
Requirement already satisfied: pip in ./venv/lib/python3.9/site-packages (23.0.1)
Collecting pip
  Using cached pip-23.3.1-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 23.0.1
    Uninstalling pip-23.0.1:
      Successfully uninstalled pip-23.0.1
Successfully installed pip-23.3.1
❯ pip install --help

Usage:
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

Description:
  Install packages from:

  - PyPI (and other indexes) using requirement specifiers.
  - VCS project urls.
  - Local project directories.
  - Local or remote source archives.

  pip also supports installing from "requirements files", which provide
  an easy way to specify a whole environment to be installed.

Install Options:
  -r, --requirement <file>    Install from the given requirements file. This option can be used multiple times.
  -c, --constraint <file>     Constrain versions using the given constraints file. This option can be used multiple times.
  --no-deps                   Don't install package dependencies.
  --pre                       Include pre-release and development versions. By default, pip only finds stable versions.
  -e, --editable <path/url>   Install a project in editable mode (i.e. setuptools "develop mode") from a local project path or a VCS url.
  --dry-run                   Don't actually install anything, just print what would be. Can be used in combination with --ignore-installed to 'resolve' the requirements.
  -t, --target <dir>          Install packages into <dir>. By default this will not replace existing files/folders in <dir>. Use --upgrade to replace existing packages in <dir> with new versions.
  --platform <platform>       Only use wheels compatible with <platform>. Defaults to the platform of the running system. Use this option multiple times to specify multiple platforms supported by the target
                              interpreter.
  --python-version <python_version>
                              The Python interpreter version to use for wheel and "Requires-Python" compatibility checks. Defaults to a version derived from the running interpreter. The version can be specified
                              using up to three dot-separated integers (e.g. "3" for 3.0.0, "3.7" for 3.7.0, or "3.7.3"). A major-minor version can also be given as a string without dots (e.g. "37" for 3.7.0).
  --implementation <implementation>
                              Only use wheels compatible with Python implementation <implementation>, e.g. 'pp', 'jy', 'cp',  or 'ip'. If not specified, then the current interpreter implementation is used.  Use
                              'py' to force implementation-agnostic wheels.
  --abi <abi>                 Only use wheels compatible with Python abi <abi>, e.g. 'pypy_41'. If not specified, then the current interpreter abi tag is used. Use this option multiple times to specify multiple
                              abis supported by the target interpreter. Generally you will need to specify --implementation, --platform, and --python-version when using this option.
  --user                      Install to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on Windows. (See the Python documentation for site.USER_BASE for full
                              details.)
  --root <dir>                Install everything relative to this alternate root directory.
  --prefix <dir>              Installation prefix where lib, bin and other top-level folders are placed. Note that the resulting installation may contain scripts and other resources which reference the Python
                              interpreter of pip, and not that of ``--prefix``. See also the ``--python`` option if the intention is to install packages into another (possibly pip-free) environment.
  --src <dir>                 Directory to check out editable projects into. The default in a virtualenv is "<venv path>/src". The default for global installs is "<current dir>/src".
  -U, --upgrade               Upgrade all specified packages to the newest available version. The handling of dependencies depends on the upgrade-strategy used.
  --upgrade-strategy <upgrade_strategy>
                              Determines how dependency upgrading should be handled [default: only-if-needed]. "eager" - dependencies are upgraded regardless of whether the currently installed version satisfies
                              the requirements of the upgraded package(s). "only-if-needed" -  are upgraded only when they do not satisfy the requirements of the upgraded package(s).
  --force-reinstall           Reinstall all packages even if they are already up-to-date.
  -I, --ignore-installed      Ignore the installed packages, overwriting them. This can break your system if the existing package is of a different version or was installed with a different package manager!
  --ignore-requires-python    Ignore the Requires-Python information.
  --no-build-isolation        Disable isolation when building a modern source distribution. Build dependencies specified by PEP 518 must be already installed if this option is used.
  --use-pep517                Use PEP 517 for building source distributions (use --no-use-pep517 to force legacy behaviour).
  --check-build-dependencies  Check the build dependencies when PEP517 is used.
  --break-system-packages     Allow pip to modify an EXTERNALLY-MANAGED Python installation
  -C, --config-settings <settings>
                              Configuration settings to be passed to the PEP 517 build backend. Settings take the form KEY=VALUE. Use multiple --config-settings options to pass multiple keys to the backend.
  --global-option <options>   Extra global options to be supplied to the setup.py call before the install or bdist_wheel command.
  --compile                   Compile Python source files to bytecode
  --no-compile                Do not compile Python source files to bytecode
  --no-warn-script-location   Do not warn when installing scripts outside PATH
  --no-warn-conflicts         Do not warn about broken dependencies
  --no-binary <format_control>
                              Do not use binary packages. Can be supplied multiple times, and each time adds to the existing value. Accepts either ":all:" to disable all binary packages, ":none:" to empty the set
                              (notice the colons), or one or more package names with commas between them (no colons). Note that some packages are tricky to compile and may fail to install when this option is used
                              on them.
  --only-binary <format_control>
                              Do not use source packages. Can be supplied multiple times, and each time adds to the existing value. Accepts either ":all:" to disable all source packages, ":none:" to empty the
                              set, or one or more package names with commas between them. Packages without binary distributions will fail to install when this option is used on them.
  --prefer-binary             Prefer binary packages over source packages, even if the source packages are newer.
  --require-hashes            Require a hash to check each requirement against, for repeatable installs. This option is implied when any package in a requirements file has a --hash option.
  --progress-bar <progress_bar>
                              Specify whether the progress bar should be used [on, off] (default: on)
  --root-user-action <root_user_action>
                              Action if pip is run as a root user. By default, a warning message is shown.
  --report <file>             Generate a JSON file describing what pip did to install the provided requirements. Can be used in combination with --dry-run and --ignore-installed to 'resolve' the requirements.
                              When - is used as file name it writes to stdout. When writing to stdout, please combine with the --quiet option to avoid mixing pip logging output with JSON output.
  --no-clean                  Don't clean up build directories.

Package Index Options:
  -i, --index-url <url>       Base URL of the Python Package Index (default https://pypi.org/simple). This should point to a repository compliant with PEP 503 (the simple repository API) or a local directory laid
                              out in the same format.
  --extra-index-url <url>     Extra URLs of package indexes to use in addition to --index-url. Should follow the same rules as --index-url.
  --no-index                  Ignore package index (only looking at --find-links URLs instead).
  -f, --find-links <url>      If a URL or path to an html file, then parse for links to archives such as sdist (.tar.gz) or wheel (.whl) files. If a local path or file:// URL that's a directory, then look for
                              archives in the directory listing. Links to VCS project URLs are not supported.

General Options:
  -h, --help                  Show help.
  --debug                     Let unhandled exceptions propagate outside the main subroutine, instead of logging them to stderr.
  --isolated                  Run pip in an isolated mode, ignoring environment variables and user configuration.
  --require-virtualenv        Allow pip to only run in a virtual environment; exit with an error otherwise.
  --python <python>           Run pip with the specified Python interpreter.
  -v, --verbose               Give more output. Option is additive, and can be used up to 3 times.
  -V, --version               Show version and exit.
  -q, --quiet                 Give less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels).
  --log <path>                Path to a verbose appending log.
  --no-input                  Disable prompting for input.
  --keyring-provider <keyring_provider>
                              Enable the credential lookup via the keyring library if user input is allowed. Specify which mechanism to use [disabled, import, subprocess]. (default: disabled)
  --proxy <proxy>             Specify a proxy in the form scheme://[user:passwd@]proxy.server:port.
  --retries <retries>         Maximum number of retries each connection should attempt (default 5 times).
  --timeout <sec>             Set the socket timeout (default 15 seconds).
  --exists-action <action>    Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
  --trusted-host <hostname>   Mark this host or host:port pair as trusted, even though it does not have valid or any HTTPS.
  --cert <path>               Path to PEM-encoded CA certificate bundle. If provided, overrides the default. See 'SSL Certificate Verification' in pip documentation for more information.
  --client-cert <path>        Path to SSL client certificate, a single file containing the private key and the certificate in PEM format.
  --cache-dir <dir>           Store the cache data in <dir>.
  --no-cache-dir              Disable the cache.
  --disable-pip-version-check
                              Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index.
  --no-color                  Suppress colored output.
  --no-python-version-warning
                              Silence deprecation warnings for upcoming unsupported Pythons.
  --use-feature <feature>     Enable new functionality, that may be backward incompatible.
  --use-deprecated <feature>  Enable deprecated functionality, that will be removed in the future.
❯ pip install --upgrade tensorflow-federated
Collecting tensorflow-federated
  Downloading tensorflow_federated-0.48.0-py2.py3-none-any.whl (42.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.8/42.8 MB 8.2 MB/s eta 0:00:00
Collecting absl-py==1.*,>=1.0 (from tensorflow-federated)
  Downloading absl_py-1.4.0-py3-none-any.whl (126 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 126.5/126.5 kB 5.6 MB/s eta 0:00:00
Collecting attrs~=21.4 (from tensorflow-federated)
  Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
Collecting cachetools~=3.1 (from tensorflow-federated)
  Using cached cachetools-3.1.1-py2.py3-none-any.whl (11 kB)
Collecting dm-tree==0.1.7 (from tensorflow-federated)
  Downloading dm_tree-0.1.7-cp39-cp39-macosx_11_0_arm64.whl (105 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 105.0/105.0 kB 3.4 MB/s eta 0:00:00
Collecting dp-accounting==0.3.0 (from tensorflow-federated)
  Downloading dp_accounting-0.3.0-py3-none-any.whl (89 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.9/89.9 kB 4.6 MB/s eta 0:00:00
Collecting farmhashpy==0.4.0 (from tensorflow-federated)
  Using cached farmhashpy-0.4.0.tar.gz (98 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting grpcio~=1.46 (from tensorflow-federated)
  Downloading grpcio-1.60.0-cp39-cp39-macosx_10_10_universal2.whl.metadata (4.0 kB)
INFO: pip is looking at multiple versions of tensorflow-federated to determine which version is compatible with other requirements. This could take a while.
Collecting tensorflow-federated
  Downloading tensorflow_federated-0.47.0-py2.py3-none-any.whl (42.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.8/42.8 MB 8.5 MB/s eta 0:00:00
  Downloading tensorflow_federated-0.46.0-py2.py3-none-any.whl (42.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.8/42.8 MB 8.9 MB/s eta 0:00:00
  Downloading tensorflow_federated-0.45.0-py2.py3-none-any.whl (42.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.8/42.8 MB 9.6 MB/s eta 0:00:00
  Downloading tensorflow_federated-0.44.0-py2.py3-none-any.whl (42.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.9/42.9 MB 10.1 MB/s eta 0:00:00
  Downloading tensorflow_federated-0.43.0-py2.py3-none-any.whl (42.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.6/42.6 MB 9.8 MB/s eta 0:00:00
  Downloading tensorflow_federated-0.42.0-py2.py3-none-any.whl (42.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.5/42.5 MB 9.3 MB/s eta 0:00:00
  Downloading tensorflow_federated-0.41.0-py2.py3-none-any.whl (42.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.4/42.4 MB 9.0 MB/s eta 0:00:00
INFO: pip is still looking at multiple versions of tensorflow-federated to determine which version is compatible with other requirements. This could take a while.
  Downloading tensorflow_federated-0.40.0-py2.py3-none-any.whl (913 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 913.3/913.3 kB 8.7 MB/s eta 0:00:00
  Downloading tensorflow_federated-0.39.0-py2.py3-none-any.whl (912 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 912.9/912.9 kB 8.2 MB/s eta 0:00:00
  Downloading tensorflow_federated-0.38.0-py2.py3-none-any.whl (906 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 906.0/906.0 kB 8.7 MB/s eta 0:00:00
  Downloading tensorflow_federated-0.37.0-py2.py3-none-any.whl (903 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 903.2/903.2 kB 8.4 MB/s eta 0:00:00
  Downloading tensorflow_federated-0.36.0-py2.py3-none-any.whl (900 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 900.6/900.6 kB 8.5 MB/s eta 0:00:00
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
  Downloading tensorflow_federated-0.34.0-py2.py3-none-any.whl (886 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 886.8/886.8 kB 9.4 MB/s eta 0:00:00
  Using cached tensorflow_federated-0.33.0-py2.py3-none-any.whl (885 kB)
Collecting absl-py~=1.0.0 (from tensorflow-federated)
  Using cached absl_py-1.0.0-py3-none-any.whl (126 kB)
Collecting dm-tree~=0.1.7 (from tensorflow-federated)
  Downloading dm_tree-0.1.8-cp39-cp39-macosx_11_0_arm64.whl (110 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 110.8/110.8 kB 4.5 MB/s eta 0:00:00
Collecting grpcio~=1.46.3 (from tensorflow-federated)
  Using cached grpcio-1.46.5.tar.gz (21.8 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting tensorflow-federated
  Using cached tensorflow_federated-0.32.0-py2.py3-none-any.whl (884 kB)
  Using cached tensorflow_federated-0.31.0-py2.py3-none-any.whl (884 kB)
  Using cached tensorflow_federated-0.30.0-py2.py3-none-any.whl (875 kB)
Collecting attrs~=21.2.0 (from tensorflow-federated)
  Using cached attrs-21.2.0-py2.py3-none-any.whl (53 kB)
Collecting tensorflow-federated
  Using cached tensorflow_federated-0.29.0-py2.py3-none-any.whl (867 kB)
  Using cached tensorflow_federated-0.28.0-py2.py3-none-any.whl (859 kB)
  Using cached tensorflow_federated-0.27.0-py2.py3-none-any.whl (861 kB)
Collecting grpcio~=1.34.0 (from tensorflow-federated)
  Using cached grpcio-1.34.1.tar.gz (21.1 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting jax~=0.2.27 (from tensorflow-federated)
  Using cached jax-0.2.28.tar.gz (887 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting tensorflow-federated
  Using cached tensorflow_federated-0.26.0-py2.py3-none-any.whl (862 kB)
  Using cached tensorflow_federated-0.24.0-py2.py3-none-any.whl (866 kB)
  Using cached tensorflow_federated-0.23.0-py2.py3-none-any.whl (866 kB)
  Using cached tensorflow_federated-0.22.0-py2.py3-none-any.whl (863 kB)
  Using cached tensorflow_federated-0.21.0-py2.py3-none-any.whl (857 kB)
  Using cached tensorflow_federated-0.20.0-py2.py3-none-any.whl (819 kB)
  Using cached tensorflow_federated-0.19.0-py2.py3-none-any.whl (602 kB)
Collecting absl-py~=0.10 (from tensorflow-federated)
  Using cached absl_py-0.15.0-py3-none-any.whl (132 kB)
Collecting attrs~=19.3.0 (from tensorflow-federated)
  Using cached attrs-19.3.0-py2.py3-none-any.whl (39 kB)
Collecting tensorflow-federated
  Using cached tensorflow_federated-0.18.0-py2.py3-none-any.whl (578 kB)
Collecting grpcio~=1.32.0 (from tensorflow-federated)
  Using cached grpcio-1.32.0.tar.gz (20.8 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting h5py~=2.10.0 (from tensorflow-federated)
  Using cached h5py-2.10.0.tar.gz (301 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting tensorflow-federated
  Using cached tensorflow_federated-0.17.0-py2.py3-none-any.whl (517 kB)
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 ... done
  Preparing metadata (pyproject.toml) ... done
Collecting grpcio~=1.29.0 (from tensorflow-federated)
  Downloading grpcio-1.29.0.tar.gz (19.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 19.6/19.6 MB 6.5 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting numpy~=1.18.4 (from tensorflow-federated)
  Downloading numpy-1.18.5.zip (5.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.4/5.4 MB 8.7 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [54 lines of output]
      Running from numpy source directory.
      <string>:461: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
      /private/var/folders/xv/z28qhj994ps_yzb343ss5j0c0000gn/T/pip-install-gsbdhp8n/numpy_5dd18ab7acf645d887ec85fb53425391/tools/cythonize.py:75: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
        required_version = LooseVersion('0.29.14')
      /private/var/folders/xv/z28qhj994ps_yzb343ss5j0c0000gn/T/pip-install-gsbdhp8n/numpy_5dd18ab7acf645d887ec85fb53425391/tools/cythonize.py:77: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
        if LooseVersion(cython_version) < required_version:

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
                  self.rng_state.ctr.v[i] = counter[i]

              self._reset_state_variables()

              self._bitgen.state = <void *>&self.rng_state
              self._bitgen.next_uint64 = &philox_uint64
                                         ^
      ------------------------------------------------------------

      _philox.pyx:195:35: Cannot assign type 'uint64_t (*)(void *) except? -1 nogil' to 'uint64_t (*)(void *) noexcept nogil'. Exception values are incompatible. Suggest adding 'noexcept' to type 'uint64_t (void *) except? -1 nogil'.
      Processing numpy/random/_bounded_integers.pxd.in
      Processing numpy/random/_philox.pyx
      Traceback (most recent call last):
        File "/private/var/folders/xv/z28qhj994ps_yzb343ss5j0c0000gn/T/pip-install-gsbdhp8n/numpy_5dd18ab7acf645d887ec85fb53425391/tools/cythonize.py", line 238, in <module>
          main()
        File "/private/var/folders/xv/z28qhj994ps_yzb343ss5j0c0000gn/T/pip-install-gsbdhp8n/numpy_5dd18ab7acf645d887ec85fb53425391/tools/cythonize.py", line 234, in main
          find_process_files(root_dir)
        File "/private/var/folders/xv/z28qhj994ps_yzb343ss5j0c0000gn/T/pip-install-gsbdhp8n/numpy_5dd18ab7acf645d887ec85fb53425391/tools/cythonize.py", line 225, in find_process_files
          process(root_dir, fromfile, tofile, function, hash_db)
        File "/private/var/folders/xv/z28qhj994ps_yzb343ss5j0c0000gn/T/pip-install-gsbdhp8n/numpy_5dd18ab7acf645d887ec85fb53425391/tools/cythonize.py", line 191, in process
          processor_function(fromfile, tofile)
        File "/private/var/folders/xv/z28qhj994ps_yzb343ss5j0c0000gn/T/pip-install-gsbdhp8n/numpy_5dd18ab7acf645d887ec85fb53425391/tools/cythonize.py", line 80, in process_pyx
          subprocess.check_call(
        File "/Users/rtirtasentana/.pyenv/versions/3.9.18/lib/python3.9/subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/Users/rtirtasentana/Documents/repos/federatedlearning/venv/bin/python', '-m', 'cython', '-3', '--fast-fail', '-o', '_philox.c', '_philox.pyx']' returned non-zero exit status 1.
      Cythonizing sources
      Traceback (most recent call last):
        File "/Users/rtirtasentana/Documents/repos/federatedlearning/venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/rtirtasentana/Documents/repos/federatedlearning/venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Users/rtirtasentana/Documents/repos/federatedlearning/venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "/private/var/folders/xv/z28qhj994ps_yzb343ss5j0c0000gn/T/pip-build-env-n_mxfcb1/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 366, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/private/var/folders/xv/z28qhj994ps_yzb343ss5j0c0000gn/T/pip-build-env-n_mxfcb1/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 480, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/private/var/folders/xv/z28qhj994ps_yzb343ss5j0c0000gn/T/pip-build-env-n_mxfcb1/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 488, in <module>
        File "<string>", line 469, in setup_package
        File "<string>", line 275, in generate_cython
      RuntimeError: Running cythonize failed!
      [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.

@miloudi2439
Copy link

I have a similar issue for MacOS M2 with Python 3.11:

`Collecting tensorflow-federated
Using cached tensorflow_federated-0.33.0-py2.py3-none-any.whl (885 kB)
Collecting absl-py~=1.0.0 (from tensorflow-federated)
Using cached absl_py-1.0.0-py3-none-any.whl (126 kB)
Collecting attrs~=21.4.0 (from tensorflow-federated)
Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
Collecting cachetools~=3.1.1 (from tensorflow-federated)
Using cached cachetools-3.1.1-py2.py3-none-any.whl (11 kB)
Collecting dm-tree~=0.1.7 (from tensorflow-federated)
Using cached dm_tree-0.1.8-cp311-cp311-macosx_11_0_arm64.whl (110 kB)
Collecting farmhashpy~=0.4.0 (from tensorflow-federated)
Using cached farmhashpy-0.4.0.tar.gz (98 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting grpcio~=1.46.3 (from tensorflow-federated)
Using cached grpcio-1.46.5.tar.gz (21.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
INFO: pip is looking at multiple versions of tensorflow-federated to determine which version is compatible with other requirements. This could take a while.
Collecting tensorflow-federated
Using cached tensorflow_federated-0.32.0-py2.py3-none-any.whl (884 kB)
Using cached tensorflow_federated-0.31.0-py2.py3-none-any.whl (884 kB)
Using cached tensorflow_federated-0.30.0-py2.py3-none-any.whl (875 kB)
Collecting attrs~=21.2.0 (from tensorflow-federated)
Using cached attrs-21.2.0-py2.py3-none-any.whl (53 kB)
Collecting tensorflow-federated
Using cached tensorflow_federated-0.29.0-py2.py3-none-any.whl (867 kB)
Using cached tensorflow_federated-0.28.0-py2.py3-none-any.whl (859 kB)
Using cached tensorflow_federated-0.27.0-py2.py3-none-any.whl (861 kB)
Collecting grpcio~=1.34.0 (from tensorflow-federated)
Using cached grpcio-1.34.1.tar.gz (21.1 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting jax~=0.2.27 (from tensorflow-federated)
Using cached jax-0.2.28.tar.gz (887 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting tensorflow-federated
Using cached tensorflow_federated-0.26.0-py2.py3-none-any.whl (862 kB)
INFO: pip is still looking at multiple versions of tensorflow-federated to determine which version is compatible with other requirements. This could take a while.
Using cached tensorflow_federated-0.24.0-py2.py3-none-any.whl (866 kB)
Using cached tensorflow_federated-0.23.0-py2.py3-none-any.whl (866 kB)
Using cached tensorflow_federated-0.22.0-py2.py3-none-any.whl (863 kB)
Using cached tensorflow_federated-0.21.0-py2.py3-none-any.whl (857 kB)
Using cached tensorflow_federated-0.20.0-py2.py3-none-any.whl (819 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
Using cached tensorflow_federated-0.19.0-py2.py3-none-any.whl (602 kB)
Collecting absl-py~=0.10 (from tensorflow-federated)
Using cached absl_py-0.15.0-py3-none-any.whl (132 kB)
Collecting attrs~=19.3.0 (from tensorflow-federated)
Using cached attrs-19.3.0-py2.py3-none-any.whl (39 kB)
Collecting tensorflow-federated
Using cached tensorflow_federated-0.18.0-py2.py3-none-any.whl (578 kB)
Collecting grpcio~=1.32.0 (from tensorflow-federated)
Using cached grpcio-1.32.0.tar.gz (20.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting h5py~=2.10.0 (from tensorflow-federated)
Using cached h5py-2.10.0.tar.gz (301 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting tensorflow-federated
Using cached tensorflow_federated-0.17.0-py2.py3-none-any.whl (517 kB)
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.
│ exit code: 1
╰─> [20 lines of output]
Traceback (most recent call last):
File "/Users/amara/Documents/python-projects/adap flower main examples-pytorch-from-centralized-to-federated/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
File "/Users/amara/Documents/python-projects/adap flower main examples-pytorch-from-centralized-to-federated/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/amara/Documents/python-projects/adap flower main examples-pytorch-from-centralized-to-federated/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/v2/4bcbx7cd7fl0qr1kdk1d3rph0000gn/T/pip-build-env-9uds3r_b/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/v2/4bcbx7cd7fl0qr1kdk1d3rph0000gn/T/pip-build-env-9uds3r_b/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "/private/var/folders/v2/4bcbx7cd7fl0qr1kdk1d3rph0000gn/T/pip-build-env-9uds3r_b/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 480, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "/private/var/folders/v2/4bcbx7cd7fl0qr1kdk1d3rph0000gn/T/pip-build-env-9uds3r_b/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "", line 34, in
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: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.`

@stefankem
Copy link

stefankem commented Dec 19, 2023

I have the same issue using also Python 3.9. I can't install it because I get a RuntimeError: Running cythonize failed!
The error happened when collecting numpy from tensorflow federated. I could resolve the error for collecting absl-py by installing it beforehand separately in the environment. I tried that with the cython package and the setuptools as well but neither did the trick.

@erlan-11
Copy link

I installed using req.txt,it shows tensorflow-compression>=2.14.0,==2.14.*
But I can't find this package

@michaelreneer
Copy link
Collaborator

@erlan-11 I'm confused where are you seeing tensorflow-compression show up in a requriements.txt? I don't think there is any Python dep on tensorflow-compression that I know about.

https://github.com/tensorflow/federated/blob/main/requirements.txt

@michaelreneer michaelreneer self-assigned this Feb 20, 2024
@michaelreneer
Copy link
Collaborator

@robertwt7 It looks like you are trying to install tensorflow-federated v0.48.0, can you try and install the latest TFF?

@michaelreneer
Copy link
Collaborator

@erlan-11 NVM, ignore my previous comment. Instead, can you share more information about your environment. What version of Python are you using? What version of TFF are you trying to install?

@Neisser
Copy link

Neisser commented Apr 28, 2024

Im getting similar issue, anyone could solve it?

@michaelreneer
Copy link
Collaborator

@Neisser Is this the same issue you are having on #4609?

@michaelreneer
Copy link
Collaborator

Duplicate of #4609

@michaelreneer michaelreneer marked this as a duplicate of #4609 Apr 29, 2024
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

6 participants