pgmagick icon indicating copy to clipboard operation
pgmagick copied to clipboard

Not able to install pgmagick on MacOS Big Sur version 11.6

Open foodspotapp opened this issue 3 years ago • 5 comments

Hi.

I tried to install pgmagick on my new Apple M1 Macbook Air.

I followed the instructions to install on Mac OS,

brew install python brew install graphicsmagick brew install boost-python3 pip3 install pgmagick

I also have python 2.7.6 installed in my system. Problem arises in the last step, saying that 'boost/python.hpp' file not found. Below is the complete log from running the last command.

biglion@pgmagick: pip3 install pgmagick Collecting pgmagick Using cached pgmagick-0.7.6.tar.gz (363 kB) Preparing metadata (setup.py) ... done Building wheels for collected packages: pgmagick Building wheel for pgmagick (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [24 lines of output] include header path: /opt/homebrew/include/GraphicsMagick boost lib: boost_python39 library path: /opt/homebrew/lib/libGraphicsMagick++ Found version 1.3.37 in file /opt/homebrew/lib/pkgconfig/GraphicsMagick++.pc GraphicsMagick version: 1.3.37 running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.9-universal2-3.9 creating build/lib.macosx-10.9-universal2-3.9/pgmagick copying pgmagick/_version.py -> build/lib.macosx-10.9-universal2-3.9/pgmagick copying pgmagick/init.py -> build/lib.macosx-10.9-universal2-3.9/pgmagick copying pgmagick/api.py -> build/lib.macosx-10.9-universal2-3.9/pgmagick running build_ext building 'pgmagick._pgmagick' extension creating build/temp.macosx-10.9-universal2-3.9 creating build/temp.macosx-10.9-universal2-3.9/src gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/usr/local/include/ -I/opt/homebrew/include/GraphicsMagick -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c ./src/_Blob.cpp -o build/temp.macosx-10.9-universal2-3.9/./src/_Blob.o -DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_27 -DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_26 -DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_24 -DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_22 -DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_20 -DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_19 -DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_6 -DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_x -D_LIBRARY_VERSION="1.3.37" ./src/_Blob.cpp:1:10: fatal error: 'boost/python.hpp' file not found #include <boost/python.hpp> ^~~~~~~~~~~~~~~~~~ 1 error generated. error: command '/usr/bin/gcc' 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 pgmagick Running setup.py clean for pgmagick Failed to build pgmagick Installing collected packages: pgmagick Running setup.py install for pgmagick ... error error: subprocess-exited-with-error

× Running setup.py install for pgmagick did not run successfully. │ exit code: 1 ╰─> [24 lines of output] include header path: /opt/homebrew/include/GraphicsMagick boost lib: boost_python39 library path: /opt/homebrew/lib/libGraphicsMagick++ Found version 1.3.37 in file /opt/homebrew/lib/pkgconfig/GraphicsMagick++.pc GraphicsMagick version: 1.3.37 running install running build running build_py creating build creating build/lib.macosx-10.9-universal2-3.9 creating build/lib.macosx-10.9-universal2-3.9/pgmagick copying pgmagick/_version.py -> build/lib.macosx-10.9-universal2-3.9/pgmagick copying pgmagick/init.py -> build/lib.macosx-10.9-universal2-3.9/pgmagick copying pgmagick/api.py -> build/lib.macosx-10.9-universal2-3.9/pgmagick running build_ext building 'pgmagick._pgmagick' extension creating build/temp.macosx-10.9-universal2-3.9 creating build/temp.macosx-10.9-universal2-3.9/src gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/usr/local/include/ -I/opt/homebrew/include/GraphicsMagick -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c ./src/_Blob.cpp -o build/temp.macosx-10.9-universal2-3.9/./src/_Blob.o -DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_27 -DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_26 -DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_24 -DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_22 -DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_20 -DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_19 -DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_6 -DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_x -D_LIBRARY_VERSION="1.3.37" ./src/_Blob.cpp:1:10: fatal error: 'boost/python.hpp' file not found #include <boost/python.hpp> ^~~~~~~~~~~~~~~~~~ 1 error generated. error: command '/usr/bin/gcc' 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. ╰─> pgmagick

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

foodspotapp avatar Feb 06 '22 07:02 foodspotapp

Got the same problem. I'm using conda. After using conda install boost it worked.

rdupz avatar May 01 '22 12:05 rdupz

I have the same problem :(

Platform: MacOS Sonoma 14.0

keshe4ka avatar Oct 06 '23 10:10 keshe4ka