jd-boyd / python-lzo

Python bindings for the LZO data compression library
GNU General Public License v2.0
74 stars 41 forks source link

File not found error when installing python-lzo on macOS 10.15 #48

Closed gordonel closed 1 year ago

gordonel commented 4 years ago

Related to #47

Same thing, but I have lzo installed via brew install lzo. This is the error I'm getting

lzomodule.c:35:10: fatal error: 'lzo/lzo1x.h' file not found
  #include <lzo/lzo1x.h>
           ^~~~~~~~~~~~~
  1 error generated.
  error: command 'xcrun' failed with exit status 1
gordonel commented 4 years ago

After following suggestions in #23 it now fails with

2 warnings generated.
  creating build/lib.macosx-10.14-x86_64-3.7
  xcrun -sdk macosx clang -arch x86_64 -bundle -undefined dynamic_lookup build/temp.macosx-10.14-x86_64-3.7/lzomodule.o -llzo2 -o build/lib.macosx-10.14-x86_64-3.7/lzo.cpython-37m-darwin.so
  ld: library not found for -llzo2
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  error: command 'xcrun' failed with exit status 1
rijieli commented 2 years ago

I'm using macOS 11.6, and M1 chip, the env below work for me.

arch -arm64 brew install lzo

export C_INCLUDE_PATH=/opt/homebrew/Cellar/lzo/2.10/include/lzo:/opt/homebrew/Cellar/lzo/2.10/include/
export LIBRARY_PATH=/opt/homebrew/lib

pip3 install python-lzo

Installing collected packages: python-lzo
  Running setup.py install for python-lzo ... done
Successfully installed python-lzo-1.12
hzcheney commented 2 years ago

I'm using macOS 11.6, and M1 chip, the env below work for me.

arch -arm64 brew install lzo

export C_INCLUDE_PATH=/opt/homebrew/Cellar/lzo/2.10/include/lzo:/opt/homebrew/Cellar/lzo/2.10/include/
export LIBRARY_PATH=/opt/homebrew/lib

pip3 install python-lzo

Installing collected packages: python-lzo
  Running setup.py install for python-lzo ... done
Successfully installed python-lzo-1.12

Thanks a lot! That really helps me! I have a macOS 12.5 with MBP 2017.