![]() So I run ‘sudo make install’, but then when I actually try and load it into Python, I get this error:įile "PythonMagick/_init_.py", line 1, in With that done, it then compiled quite nicely. So I had to download PythonMagick 0.9.5 and copy the following files from it into the ‘pythonmagick_src’ directory of 0.9.3: It would seem that the ImageMagick API has changed a little, but thankfully the PythonMagick guys have patched that in the latest version. _Image.cpp:114: error: address of overloaded function with no contextual type information _Image.cpp:97: error: address of overloaded function with no contextual type information _Image.cpp:90: error: address of overloaded function with no contextual type information _Image.cpp:89: error: address of overloaded function with no contextual type information _Image.cpp: In function 'void Export_pyste_src_Image()': ![]() Next I had to actually compile the thing. Success! All seems to have worked this time – it picked up Boost::Python and no more errors showed up (I have secretly skipped a step where I installed the MacPorts python_select package to make sure that it was definitely using Python 2.6, but hopefully you can figure that one out on your own).īut alas, not so easy. configure -prefix=/opt/local CPPFLAGS="-I/opt/local/include -I/opt/local/Library/Frameworks/amework/Versions/2.6/include/python2.6" LDFLAGS=-L/opt/local/lib So let’s try the configure again with that new information: That revealed that the include files were being installed in /opt/local/Library/Frameworks/amework/Versions/2.6/include/python2.6. $ port contents python26 | grep pyconfig.h But somebody put me on to a good way to find out where MacPorts has put stuff: These pyconfig.h and Python.h files and so on are usually installed with the Python development package, but supposedly MacPorts just installs everything all together under /opt/local/include/python2.6, so I wondered what was going on. opt/local/include/boost/python/detail/wrap_python.hpp:142:21: error: Python.h: No such file or directory opt/local/include/boost/python/detail/wrap_python.hpp:78:2: error: #error Python 2.2 or higher is required for this version of Boost.Python. opt/local/include/boost/python/detail/wrap_python.hpp:75:24: error: patchlevel.h: No such file or directory opt/local/include/boost/python/detail/wrap_python.hpp:50:23: error: pyconfig.h: No such file or directory In file included from /opt/local/include/boost/python/detail/prefix.hpp:13,įrom /opt/local/include/boost/python/module.hpp:8, I was getting all sorts of error messages like this:Ĭonfigure:14953: checking whether the Boost::Python library is availableĬonfigure:14983: g++ -c -g -O2 -I/opt/local/include conftest.cpp >&5 Eventually I figured out that you can get more information by reading the config.log file. ![]() configure -prefix=/opt/local CPPFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/libīut no matter what I tried, I kept getting the message “checking whether the Boost::Python library is available… no”. Reading around it became clear that I needed to specify the MacPorts include and library directories, like so: I used v0.9.3 since that seemed the latest version compatible with Python 2.x. So far, so good! That installed the package “boost Next was to install ImageMagick:Īgain, nice and smooth! That installed “ImageMagick Now came the hard part: building PythonMagick. Since I couldn’t get very far that route, I decided to try the MacPorts approach, which makes installing these kinds of things very straightforward.Īgain, first I had to try and install Boost, with the Python module enabled: ![]() If I hit Ctrl-C and then tried again, it just sits there saying this: However, I’d find it would get so far and then just hang – I left it for about 24 hours with no progress. When it became time to install the Boost::Python module, I tried following the instructions in the documentation: That meant first downloading and installing Boost, which again I tried doing from source (1.46.1). Initially I tried building ImageMagick from source. I’ve been having a bit of a headache trying to install PythonMagick (the Python bindings for ImageMagick) on Mac OS X Snow Leopard, so having eventually had a modicum of success I thought I’d post my adventures here.īut first, let me outline the problems I was having. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |