python-lzo icon indicating copy to clipboard operation
python-lzo copied to clipboard

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

Open gordonel opened this issue 4 years ago • 3 comments

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 avatar Apr 25 '20 22:04 gordonel

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

gordonel avatar Apr 25 '20 23:04 gordonel

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

rijieli avatar Dec 23 '21 11:12 rijieli

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.

hzcheney avatar Sep 12 '22 07:09 hzcheney