1

work/Versions/3.9/Headers -c src/lxml/etree.c -o build/temp.macosx-10.9-universal2-cpython-39/src/lxml/etree.o -w -flat_namespace src/lxml/etree.c:96:10: fatal error: 'Python.h' file not found #include "Python.h" ^~~~~~~~~~ 1 error generated. Compile failed: command '/usr/bin/clang' failed with exit code 1 cc -arch x86_64 -I/usr/include/libxml2 -c /var/folders/cf/lh0781v528b2s9g1hk8v7bg40000gn/T/xmlXPathInit1vfqpnc0.c -o var/folders/cf/lh0781v528b2s9g1hk8v7bg40000gn/T/xmlXPathInit1vfqpnc0.o cc -arch x86_64 var/folders/cf/lh0781v528b2s9g1hk8v7bg40000gn/T/xmlXPathInit1vfqpnc0.o -lxml2 -o a.out 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: legacy-install-failure

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

Try using pip3 install lxml, But the above problems still occur

Lans
  • 11
  • 1

1 Answers1

0

Try installing outside venv. That's the only option that worked for me.

yeaske
  • 1,352
  • 14
  • 21