[PyCuda] pycuda on os x,
amirnntp at gmail.com
Sun Dec 7 21:12:18 PST 2008
I've been unable to build pycuda for the same reason, boost-python being linked
to the wrong python. But I am unable to get around it. The desired python is the
boost_1_37_0 amir$ ./configure
boost_1_37_0 amir$ cat user-config.jam
# Boost.Build Configuration
# Automatically generated by Boost configure
# Compiler configuration
using darwin ;
# Python configuration
using python : 2.5 : /Library/Frameworks/Python.framework/Versions/4.0.30002 ;
but it seems to be linking to the OS X default python and my subsequent build of
pycuda results in the same 'version mismatch' error:
lib amir$ otool -L libboost_python-xgcc40-mt-1_37.dylib
libboost_python-xgcc40-mt-1_37.dylib (compatibility version 0.0.0, current
version 2.5.0, current version 2.5.1)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
How can I get around this? Is it a bug with the boost build system?
Bill Punch <punch at ...> writes:
> Thanks very much. boost had indeed linked against the default Leopard
> python version (2.5.1) instead of the later update I have been using
> (2.5.2). Truth is, I had forgotten there was an "original" version and
> that's what threw me off (/System/Library/Frameworks vs
> /Library/Frameworks for the newer stuff from python.org). It shouldn't
> have mattered but it did. Works now. Thanks again.
> Nicholas Piël wrote:
> > On Dec 4, 2008, at 8:18 PM, Bill Punch wrote:
> >> I've given this a pretty good try but no luck. Any help appreciated. I
> >> have a
> >> Macbook Pro (Model Identifier MacBookPro3,1). 2.4 GHz, 4Gb, with a
> >> GeForce 8600M GT and 256 Mb. Running Leopard 10.5.5
> >>> Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53)
> >>> [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
> >>> Type "help", "copyright", "credits" or "license" for more information.
> >>>>>> import pycuda.driver
> >>> Fatal Python error: Interpreter not initialized (version mismatch?)
> >>> Abort trap
> >> The wisdom I've seen is that this is a mismatch of version (of python,
> >> of gcc, something) but I'm at a loss as to what given what is shown
> >> above. Any help appreciated.
> > The problem is probably that the boost library is linked against a
> > different Python version. You can use 'otool -L library'
> > fe:
> > $ otool -L /usr/local/lib/libboost_python-xgcc40-mt.dylib
> > Now check if this is the same Python version you are currently running
> > or Pycuda is linked against. It could very well be that boost compiled
> > against your DarwinPorts/Fink Python and pycuda is using your
> > Framework version.
> > Good luck!
> > Nicholas
More information about the PyCUDA