On 14 Feb., 19:41, Harry van der Wolf <[email protected]> wrote: > cmake hadn't installed it. So I had to set the python path to the cmake > build folder.
You did the right thing for now. That is the current status quo on the Mac. If you look at the CMakeLists.txt in the python_scripting directory, you will see that the installation paths for, amongst other things, Mac OS aren't set, because we didn't know what these paths should be for python modules on Mac OS. This is where the Mac OS wizards come in and set these paths to what they know to be appropriate ;-) > I got the following error upon importing: > ... > ImportError: dlopen(./_hsi.so, 2): no suitable image found. Did find: > ./_hsi.so: mach-o, but wrong architecture > > The "./_hsi.so: mach-o, but wrong architecture" is is a weird error. The > _hsi.so is an i386 library like all the rest. This is indeed a weird error, but with this one I can't help you beyond guesswork. Did you make an attempt to rename _hsi.so to what you think is the accepted name for shared libraries, just on the off chance that's the problem? And are you sure they're all either 32 bit or 64 bit? I've googled your error, and it seems to be a common thing, often occuring when there are 32/64 bit problems. Often the tool lipo is mentioned to have a look at the libraries in question. The next possibility is this: When importing a python module which has been compiled from C or C++, if I'm not mistaken, the module should ideally be compiled with the same compiler that the python interpreter was compiled with. So if the python you have on your mac was compiled with apple's compiler and your module is made by something else, things might go wrong. Your Python interpreter says: [GCC 4.2.1 (Apple Inc. build 5664)] on darwin What gcc is being used to build hugin, and therefore the python module? On my system gcc is 4.4.5, so maybe there's a problem here. It may be enough to get a recent build of python, the best for compatibilty's sake would be to compile pyhon from source with the self-same compiler you're using otherwise. If that doesn't help, I'd kindly ask you to try and find some help from someone who knows the ins and outs of building and using SWIG modules on the Mac - you'd be much better suited for this task than I, because I've never had a Mac, let alone programmed one. SWIG modules are a very common thing after all, many large libraries use SWIG to create their python bindings, so it should be a very well-known thing. If you can't find help, please let me know as well, because then we have a genuine problem at hand and have to figure out a way of dealing with it. Kay -- You received this message because you are subscribed to the Google Groups "Hugin and other free panoramic software" group. A list of frequently asked questions is available at: http://wiki.panotools.org/Hugin_FAQ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/hugin-ptx
