FedML-AI/FedML

Failed to install FedML with `pip3` on M1 Mac due to `Getting requirements to build wheel did not run successfully`

Open

#790 创建于 2023年2月24日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)Python (743 fork)batch import
enhancementhelp wantedquestion

仓库指标

Star
 (3,930 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

I just tried installing FedML with pip3 using python3.10.10 from Homebrew on macOS 12.6, here is the full output:

$ pip3 install fedml
Collecting fedml
  Using cached fedml-0.7.447-py2.py3-none-any.whl (918 kB)
Requirement already satisfied: PyYAML in /opt/homebrew/lib/python3.10/site-packages (from fedml) (6.0)
Requirement already satisfied: pandas in /opt/homebrew/lib/python3.10/site-packages (from fedml) (1.5.3)
Collecting uvicorn
  Using cached uvicorn-0.20.0-py3-none-any.whl (56 kB)
Collecting fastapi==0.92.0
  Using cached fastapi-0.92.0-py3-none-any.whl (56 kB)
Requirement already satisfied: matplotlib in /opt/homebrew/lib/python3.10/site-packages (from fedml) (3.7.0)
Requirement already satisfied: tqdm in /opt/homebrew/lib/python3.10/site-packages (from fedml) (4.64.1)
Collecting typing-extensions==4.4.0
  Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Collecting pynvml
  Using cached pynvml-11.5.0-py3-none-any.whl (53 kB)
Collecting aiohttp>=3.8.1
  Downloading aiohttp-3.8.4-cp310-cp310-macosx_11_0_arm64.whl (336 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 336.9/336.9 kB 393.7 kB/s eta 0:00:00
Collecting wandb==0.13.2
  Using cached wandb-0.13.2-py2.py3-none-any.whl (1.8 MB)
Collecting eciespy
  Using cached eciespy-0.3.13-py3-none-any.whl (11 kB)
Collecting ntplib
  Downloading ntplib-0.4.0-py2.py3-none-any.whl (6.8 kB)
Requirement already satisfied: click in /opt/homebrew/lib/python3.10/site-packages (from fedml) (8.1.3)
Collecting networkx
  Downloading networkx-3.0-py3-none-any.whl (2.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 3.5 MB/s eta 0:00:00
Collecting attrdict
  Downloading attrdict-2.0.1-py2.py3-none-any.whl (9.9 kB)
Collecting python-rapidjson>=0.9.1
  Downloading python-rapidjson-1.9.tar.gz (223 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 223.1/223.1 kB 6.5 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting multiprocess
  Using cached multiprocess-0.70.14-py310-none-any.whl (134 kB)
Collecting wget
  Using cached wget-3.2.zip (10 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in /opt/homebrew/lib/python3.10/site-packages (from fedml) (1.24.2)
Collecting httpx
  Using cached httpx-0.23.3-py3-none-any.whl (71 kB)
Collecting redis
  Downloading redis-4.5.1-py3-none-any.whl (238 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 238.5/238.5 kB 6.3 MB/s eta 0:00:00
Collecting gensim
  Downloading gensim-4.3.0-cp310-cp310-macosx_10_9_universal2.whl (24.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 24.5/24.5 MB 4.8 MB/s eta 0:00:00
Collecting geventhttpclient<=2.0.2,>=1.4.4
  Downloading geventhttpclient-2.0.2-cp310-cp310-macosx_11_0_arm64.whl (41 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.4/41.4 kB 974.4 kB/s eta 0:00:00
Collecting numpy
  Using cached numpy-1.21.0.zip (10.3 MB)
  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
  ╰─> [76 lines of output]
      <string>:63: RuntimeWarning: NumPy 1.21.0 may not yet support Python 3.10.
      Running from numpy source directory.
      running egg_info
      running build_src
      build_src
      creating numpy.egg-info
      writing numpy.egg-info/PKG-INFO
      writing dependency_links to numpy.egg-info/dependency_links.txt
      writing entry points to numpy.egg-info/entry_points.txt
      writing top-level names to numpy.egg-info/top_level.txt
      writing manifest file 'numpy.egg-info/SOURCES.txt'
      /opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/egg_info.py:661: SetuptoolsDeprecationWarning: Custom 'build_py' does not implement 'get_data_files_without_manifest'.
      Please extend command classes from setuptools instead of distutils.
        warnings.warn(
      unifing config_cc, config, build_clib, build_ext, build commands --compiler options
      unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
      Traceback (most recent call last):
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
          self.run_setup()
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/build_meta.py", line 484, in run_setup
          super(_BuildMetaLegacyBackend,
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/build_meta.py", line 335, in run_setup
          exec(code, locals())
        File "<string>", line 447, in <module>
        File "<string>", line 439, in setup_package
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/__init__.py", line 108, in setup
          return distutils.core.setup(**attrs)
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/dist.py", line 1221, in run_command
          super().run_command(command)
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/private/var/folders/g4/csj76blj7wn1hpq049gv1wjw0000gn/T/pip-install-m0okm9y5/numpy_cb22649a4595424e8e91c8a547481339/numpy/distutils/command/egg_info.py", line 25, in run
          _egg_info.run(self)
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 318, in run
          self.find_sources()
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 326, in find_sources
          mm.run()
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 570, in run
          self.add_defaults()
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 608, in add_defaults
          sdist.add_defaults(self)
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/sdist.py", line 107, in add_defaults
          self._add_defaults_build_sub_commands()
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/sdist.py", line 127, in _add_defaults_build_sub_commands
          self.filelist.extend(chain.from_iterable(files))
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 513, in extend
          self.files.extend(filter(self._safe_path, paths))
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/sdist.py", line 126, in <genexpr>
          files = (c.get_source_files() for c in cmds if hasattr(c, "get_source_files"))
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/sdist.py", line 125, in <genexpr>
          cmds = (self.get_finalized_command(c) for c in missing_cmds)
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 305, in get_finalized_command
          cmd_obj.ensure_finalized()
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
          self.finalize_options()
        File "/private/var/folders/g4/csj76blj7wn1hpq049gv1wjw0000gn/T/pip-install-m0okm9y5/numpy_cb22649a4595424e8e91c8a547481339/numpy/distutils/command/config_compiler.py", line 69, in finalize_options
          v = getattr(c, a)
        File "/private/var/folders/g4/csj76blj7wn1hpq049gv1wjw0000gn/T/pip-build-env-eqzb_efe/overlay/lib/python3.10/site-packages/Cython/Distutils/old_build_ext.py", line 157, in __getattr__
          return _build_ext.build_ext.__getattr__(self, name)
        File "/opt/homebrew/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
          raise AttributeError(attr)
      AttributeError: fcompiler. Did you mean: 'compiler'?
      [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.

This seems to suggest that FedML is using NumPy 1.21.0 which does not support Python3.10.

贡献者指南