libffcv / ffcv

FFCV: Fast Forward Computer Vision (and other ML workloads!)
https://ffcv.io
Apache License 2.0
2.84k stars 178 forks source link

Does FFCV work on apple sillicon? #265

Closed jatentaki closed 1 year ago

jatentaki commented 1 year ago

I tried installing and I am meeting the error below. Before I dig deeper I'd like to ask if it's maybe a known issue with M1 chips or rather something specific to my setup which I should continue troubleshooting.

jatentaki@tuna ~> pip install ffcv                                       (ffcv) 
Collecting ffcv
  Using cached ffcv-0.0.3.tar.gz (53 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: terminaltables in /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/lib/python3.9/site-packages (from ffcv) (3.1.10)
Collecting pytorch_pfn_extras
  Using cached pytorch_pfn_extras-0.6.1-py3-none-any.whl
Requirement already satisfied: fastargs in /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/lib/python3.9/site-packages (from ffcv) (1.2.0)
Collecting matplotlib
  Using cached matplotlib-3.6.1-cp39-cp39-macosx_11_0_arm64.whl (7.2 MB)
Collecting sklearn
  Using cached sklearn-0.0-py2.py3-none-any.whl
Requirement already satisfied: imgcat in /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/lib/python3.9/site-packages (from ffcv) (0.5.0)
Collecting pandas
  Using cached pandas-1.5.0-cp39-cp39-macosx_11_0_arm64.whl (10.9 MB)
Requirement already satisfied: assertpy in /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/lib/python3.9/site-packages (from ffcv) (1.1)
Requirement already satisfied: tqdm in /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/lib/python3.9/site-packages (from ffcv) (4.64.1)
Collecting psutil
  Using cached psutil-5.9.2.tar.gz (479 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: webdataset in /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/lib/python3.9/site-packages (from ffcv) (0.2.26)
Requirement already satisfied: pillow>=6.2.0 in /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/lib/python3.9/site-packages (from matplotlib->ffcv) (9.2.0)
Requirement already satisfied: numpy>=1.19 in ./.local/lib/python3.9/site-packages (from matplotlib->ffcv) (1.22.2)
Collecting fonttools>=4.22.0
  Using cached fonttools-4.37.4-py3-none-any.whl (960 kB)
Collecting cycler>=0.10
  Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
Requirement already satisfied: pyparsing>=2.2.1 in /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/lib/python3.9/site-packages (from matplotlib->ffcv) (3.0.9)
Collecting kiwisolver>=1.0.1
  Using cached kiwisolver-1.4.4-cp39-cp39-macosx_11_0_arm64.whl (63 kB)
Collecting packaging>=20.0
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting contourpy>=1.0.1
  Using cached contourpy-1.0.5-cp39-cp39-macosx_11_0_arm64.whl (226 kB)
Requirement already satisfied: python-dateutil>=2.7 in /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/lib/python3.9/site-packages (from matplotlib->ffcv) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/lib/python3.9/site-packages (from pandas->ffcv) (2022.4)
Requirement already satisfied: typing-extensions>=3.10 in /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/lib/python3.9/site-packages (from pytorch_pfn_extras->ffcv) (4.4.0)
Requirement already satisfied: torch in /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/lib/python3.9/site-packages (from pytorch_pfn_extras->ffcv) (1.12.1)
Collecting scikit-learn
  Using cached scikit_learn-1.1.2-cp39-cp39-macosx_12_0_arm64.whl (7.7 MB)
Requirement already satisfied: pyyaml in /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/lib/python3.9/site-packages (from webdataset->ffcv) (6.0)
Requirement already satisfied: braceexpand in /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/lib/python3.9/site-packages (from webdataset->ffcv) (0.1.7)
Requirement already satisfied: six>=1.5 in /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/lib/python3.9/site-packages (from python-dateutil>=2.7->matplotlib->ffcv) (1.16.0)
Collecting joblib>=1.0.0
  Using cached joblib-1.2.0-py3-none-any.whl (297 kB)
Requirement already satisfied: scipy>=1.3.2 in /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/lib/python3.9/site-packages (from scikit-learn->sklearn->ffcv) (1.9.2)
Requirement already satisfied: threadpoolctl>=2.0.0 in /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/lib/python3.9/site-packages (from scikit-learn->sklearn->ffcv) (3.1.0)
Building wheels for collected packages: ffcv, psutil
  Building wheel for ffcv (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [88 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.0-arm64-cpython-39
      creating build/lib.macosx-11.0-arm64-cpython-39/ffcv
      copying ffcv/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv
      copying ffcv/types.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv
      copying ffcv/memory_allocator.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv
      copying ffcv/reader.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv
      copying ffcv/utils.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv
      copying ffcv/libffcv.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv
      copying ffcv/writer.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv
      creating build/lib.macosx-11.0-arm64-cpython-39/ffcv/pipeline
      copying ffcv/pipeline/compiler.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/pipeline
      copying ffcv/pipeline/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/pipeline
      copying ffcv/pipeline/allocation_query.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/pipeline
      copying ffcv/pipeline/operation.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/pipeline
      copying ffcv/pipeline/pipeline.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/pipeline
      copying ffcv/pipeline/state.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/pipeline
      creating build/lib.macosx-11.0-arm64-cpython-39/ffcv/memory_managers
      copying ffcv/memory_managers/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/memory_managers
      copying ffcv/memory_managers/common.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/memory_managers
      copying ffcv/memory_managers/base.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/memory_managers
      copying ffcv/memory_managers/os_cache.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/memory_managers
      creating build/lib.macosx-11.0-arm64-cpython-39/ffcv/traversal_order
      copying ffcv/traversal_order/quasi_random.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/traversal_order
      copying ffcv/traversal_order/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/traversal_order
      copying ffcv/traversal_order/random.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/traversal_order
      copying ffcv/traversal_order/sequential.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/traversal_order
      copying ffcv/traversal_order/base.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/traversal_order
      creating build/lib.macosx-11.0-arm64-cpython-39/ffcv/transforms
      copying ffcv/transforms/translate.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/transforms
      copying ffcv/transforms/mixup.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/transforms
      copying ffcv/transforms/poisoning.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/transforms
      copying ffcv/transforms/cutout.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/transforms
      copying ffcv/transforms/normalize.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/transforms
      copying ffcv/transforms/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/transforms
      copying ffcv/transforms/ops.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/transforms
      copying ffcv/transforms/common.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/transforms
      copying ffcv/transforms/flip.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/transforms
      copying ffcv/transforms/module.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/transforms
      copying ffcv/transforms/random_resized_crop.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/transforms
      copying ffcv/transforms/replace_label.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/transforms
      creating build/lib.macosx-11.0-arm64-cpython-39/ffcv/loader
      copying ffcv/loader/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/loader
      copying ffcv/loader/epoch_iterator.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/loader
      copying ffcv/loader/loader.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/loader
      creating build/lib.macosx-11.0-arm64-cpython-39/ffcv/benchmarks
      copying ffcv/benchmarks/benchmark.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/benchmarks
      copying ffcv/benchmarks/decorator.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/benchmarks
      copying ffcv/benchmarks/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/benchmarks
      copying ffcv/benchmarks/__main__.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/benchmarks
      creating build/lib.macosx-11.0-arm64-cpython-39/ffcv/fields
      copying ffcv/fields/rgb_image.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/fields
      copying ffcv/fields/decoders.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/fields
      copying ffcv/fields/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/fields
      copying ffcv/fields/ndarray.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/fields
      copying ffcv/fields/basics.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/fields
      copying ffcv/fields/bytes.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/fields
      copying ffcv/fields/json.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/fields
      copying ffcv/fields/base.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/fields
      creating build/lib.macosx-11.0-arm64-cpython-39/ffcv/memory_managers/process_cache
      copying ffcv/memory_managers/process_cache/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/memory_managers/process_cache
      copying ffcv/memory_managers/process_cache/page_reader.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/memory_managers/process_cache
      copying ffcv/memory_managers/process_cache/context.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/memory_managers/process_cache
      copying ffcv/memory_managers/process_cache/schedule.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/memory_managers/process_cache
      copying ffcv/memory_managers/process_cache/manager.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/memory_managers/process_cache
      creating build/lib.macosx-11.0-arm64-cpython-39/ffcv/transforms/utils
      copying ffcv/transforms/utils/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/transforms/utils
      copying ffcv/transforms/utils/fast_crop.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/transforms/utils
      creating build/lib.macosx-11.0-arm64-cpython-39/ffcv/benchmarks/suites
      copying ffcv/benchmarks/suites/jpeg_decode.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/benchmarks/suites
      copying ffcv/benchmarks/suites/image_read.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/benchmarks/suites
      copying ffcv/benchmarks/suites/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/benchmarks/suites
      copying ffcv/benchmarks/suites/memory_read.py -> build/lib.macosx-11.0-arm64-cpython-39/ffcv/benchmarks/suites
      running build_ext
      building 'ffcv._libffcv' extension
      creating build/temp.macosx-11.0-arm64-cpython-39
      creating build/temp.macosx-11.0-arm64-cpython-39/libffcv
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/include -arch arm64 -I/opt/homebrew/Caskroom/miniforge/base/envs/ffcv/include/opencv4 -I/opt/homebrew/Caskroom/miniforge/base/envs/ffcv/include -I/opt/homebrew/Caskroom/miniforge/base/envs/ffcv/include/python3.9 -c ./libffcv/libffcv.cpp -o build/temp.macosx-11.0-arm64-cpython-39/./libffcv/libffcv.o
      In file included from ./libffcv/libffcv.cpp:2:
      In file included from /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/include/python3.9/Python.h:25:
      /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/bin/../include/c++/v1/stdio.h:107:15: fatal error: 'stdio.h' file not found
      #include_next <stdio.h>
                    ^~~~~~~~~
      1 error generated.
      error: command '/opt/homebrew/Caskroom/miniforge/base/envs/ffcv/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for ffcv
  Running setup.py clean for ffcv
  Building wheel for psutil (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [48 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.0-arm64-cpython-39
      creating build/lib.macosx-11.0-arm64-cpython-39/psutil
      copying psutil/_pswindows.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil
      copying psutil/_common.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil
      copying psutil/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil
      copying psutil/_psosx.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil
      copying psutil/_psbsd.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil
      copying psutil/_psaix.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil
      copying psutil/_pslinux.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil
      copying psutil/_compat.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil
      copying psutil/_psposix.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil
      copying psutil/_pssunos.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil
      creating build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_contracts.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_connections.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/runner.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_unicode.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_misc.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_posix.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_linux.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_sunos.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_aix.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_process.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_bsd.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_system.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_osx.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_memleaks.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_windows.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/__main__.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_testutils.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      running build_ext
      building 'psutil._psutil_osx' extension
      creating build/temp.macosx-11.0-arm64-cpython-39
      creating build/temp.macosx-11.0-arm64-cpython-39/psutil
      creating build/temp.macosx-11.0-arm64-cpython-39/psutil/arch
      creating build/temp.macosx-11.0-arm64-cpython-39/psutil/arch/osx
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/include -arch arm64 -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=592 -DPSUTIL_OSX=1 -I/opt/homebrew/Caskroom/miniforge/base/envs/ffcv/include/python3.9 -c psutil/_psutil_common.c -o build/temp.macosx-11.0-arm64-cpython-39/psutil/_psutil_common.o
      In file included from psutil/_psutil_common.c:9:
      /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/include/python3.9/Python.h:25:10: fatal error: 'stdio.h' file not found
      #include <stdio.h>
               ^~~~~~~~~
      1 error generated.
      error: command '/opt/homebrew/Caskroom/miniforge/base/envs/ffcv/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for psutil
  Running setup.py clean for psutil
Failed to build ffcv psutil
Installing collected packages: psutil, packaging, kiwisolver, joblib, fonttools, cycler, contourpy, scikit-learn, pytorch_pfn_extras, pandas, matplotlib, sklearn, ffcv
  Running setup.py install for psutil ... error
  error: subprocess-exited-with-error

  × Running setup.py install for psutil did not run successfully.
  │ exit code: 1
  ╰─> [50 lines of output]
      running install
      /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.0-arm64-cpython-39
      creating build/lib.macosx-11.0-arm64-cpython-39/psutil
      copying psutil/_pswindows.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil
      copying psutil/_common.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil
      copying psutil/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil
      copying psutil/_psosx.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil
      copying psutil/_psbsd.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil
      copying psutil/_psaix.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil
      copying psutil/_pslinux.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil
      copying psutil/_compat.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil
      copying psutil/_psposix.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil
      copying psutil/_pssunos.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil
      creating build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_contracts.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_connections.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/runner.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_unicode.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_misc.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_posix.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_linux.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_sunos.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_aix.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_process.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_bsd.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_system.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_osx.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_memleaks.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_windows.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/__main__.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      copying psutil/tests/test_testutils.py -> build/lib.macosx-11.0-arm64-cpython-39/psutil/tests
      running build_ext
      building 'psutil._psutil_osx' extension
      creating build/temp.macosx-11.0-arm64-cpython-39
      creating build/temp.macosx-11.0-arm64-cpython-39/psutil
      creating build/temp.macosx-11.0-arm64-cpython-39/psutil/arch
      creating build/temp.macosx-11.0-arm64-cpython-39/psutil/arch/osx
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/include -arch arm64 -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=592 -DPSUTIL_OSX=1 -I/opt/homebrew/Caskroom/miniforge/base/envs/ffcv/include/python3.9 -c psutil/_psutil_common.c -o build/temp.macosx-11.0-arm64-cpython-39/psutil/_psutil_common.o
      In file included from psutil/_psutil_common.c:9:
      /opt/homebrew/Caskroom/miniforge/base/envs/ffcv/include/python3.9/Python.h:25:10: fatal error: 'stdio.h' file not found
      #include <stdio.h>
               ^~~~~~~~~
      1 error generated.
      error: command '/opt/homebrew/Caskroom/miniforge/base/envs/ffcv/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> psutil

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
andrewilyas commented 1 year ago

Right now we have only tested on Linux with NVIDIA GPUs, so Apple Silicon is not supported.

We have pretty limited capacity so while we'd happily look at a pull request for Apple Silicon support, I don't think it's something on our immediate development roadmap. Sorry about that!