5

I am trying to install fastavro on my Mac M1 laptop, but got the error:

Headers -c fastavro/_read.c -o build/temp.macosx-10.9-universal2-cpython-39/fastavro/_read.o
      fastavro/_read.c:6:10: fatal error: 'Python.h' file not found
      #include "Python.h"
               ^~~~~~~~~~
      1 error generated.
      error: command '/usr/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 fastavro
ERROR: Could not build wheels for fastavro, which is required to install pyproject.toml-based projects

My python and system info is:

Python 3.9.6
virtualenv==20.16.6
% sw_vers
ProductName:    macOS
ProductVersion: 12.6
BuildVersion:   21G115

Anyone has ideas? Thanks a lot!

Zichen Ma
  • 907
  • 3
  • 14
  • 30

0 Answers0