-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to install pgmagick on MacOS Big Sur version 11.6 #74
Comments
Got the same problem. I'm using conda. |
I have the same problem :( Platform: MacOS Sonoma 14.0 |
Same issue here with Sonoma 14.5 on M3 chip. |
Dug into this some more and found the path was not being set correctly for homebrew on Apple chips, so I modified the setup.py file. I ran it with pip install path/to/my/local/version/of/pgmagick-master However, while I now have the path to the missing python.hpp file at /opt/homebrew/opt/boost/include/boost/python.hpp, it is still not being picked up. I'll keep looking at what to amend, but I'm just guessing here at the moment. Any suggestions of what to try would be great. My setup.py file is attached with added txt extension to keep GitHub happy. |
I found a way to make this work. There are two issues that make it trickier for those of us on newer MacBooks with Apple chips. One, is the paths as mentioned previously. Two, is the Apple version of g++, which is Apple Clang, that needs to have a flag set for compiling the C++ code. Part one: setting the paths Part two: adding the correct flag for GCC This meant my new install command was CXXFLAGS=-std=c++11 pip install 'path to pgmagick source code' (without quotes) This took some time to run, but worked. I can now hopefully get the rest of this working correctly. |
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.
The text was updated successfully, but these errors were encountered: