carsales / pyheif

Python 3.6+ interface to libheif library
Apache License 2.0
166 stars 41 forks source link

Installing pyheif on Mac OS 12 failing no matter what #77

Closed jackinthesky closed 2 years ago

jackinthesky commented 2 years ago

Hi I have been trying to install pyheif in many different ways. By inputting the following command lines, it comes to a dead end with errors. % brew install libffi libheif % pip install git+https://github.com/carsales/pyheif.git

I get the following messages:

creating build/temp.macosx-10.9-x86_64-3.9/build/temp.macosx-10.9-x86_64-3.9 clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/nishimakihiroshi/opt/anaconda3/include -arch x86_64 -I/Users/nishimakihiroshi/opt/anaconda3/include -fPIC -O2 -isystem /Users/nishimakihiroshi/opt/anaconda3/include -arch x86_64 -I/usr/local/include -I/usr/include -I/opt/local/include -I/Users/nishimakihiroshi/opt/anaconda3/include/python3.9 -c build/temp.macosx-10.9-x86_64-3.9/_libheif_cffi.c -o build/temp.macosx-10.9-x86_64-3.9/build/temp.macosx-10.9-x86_64-3.9/_libheif_cffi.o xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun error: command '/usr/bin/clang' failed with exit code 1

I tried to install with a virtual environment but still I get the error message saying

ant32bit-carsales commented 2 years ago

It says you don't have xcrun. Have you tried any method to install it?

jackinthesky commented 2 years ago

Thank you, it was the case that I had not installed Xcode yet. After installing it, there was no issue in stalling pyheif.