I also had this problem. Python on Snow Leopard defaults to a 64-bit executable. You can check this by typing: import sys print sys.maxint
If it's ~2 billion, you're running Python in 32-bit mode. If it's a huge number, you've got a 64-bit Python, which conflicts with your 32-bit CUDA/PyCUDA drivers and can cause your error message. You can force Python on Snow Leopard to run in 32-bit by setting a special environment variable: VERSIONER_PYTHON_PREFER_32_BIT=yes Or you can make this change permanent and global by writing this to the defaults: defaults write com.apple.versioner.python Prefer-32-Bit 1 - bryan On Jan 9, 2010, at 10:39 AM, David Dreisigmeyer wrote: > The examples run now but I'm getting: > > In [1]: import pycuda.tools > --------------------------------------------------------------------------- > ImportError Traceback (most recent call last) > > /Users/daviddreisigmeyer/<ipython console> in <module>() > > /Library/Python/2.6/site-packages/ > pycuda-0.94beta-py2.6-macosx-10.6-i386.egg/pycuda/tools.py in > > <module>() > 28 """ > 29 > ---> 30 import pycuda.driver as cuda > 31 from pytools import memoize, decorator > 32 import pycuda._driver as _drv > > /Library/Python/2.6/site-packages/ > pycuda-0.94beta-py2.6-macosx-10.6-i386.egg/pycuda/driver.py > > in <module>() > 2 > 3 > 4 > 5 > 6 class CompileError(Error): > > ImportError: dlopen(/Library/Python/2.6/ > site-packages/pycuda-0.94beta-py2.6-macosx-10.6-i386.egg/pycuda/_driver.so, > 2): no suitable image found. Did find: > /Library/Python/2.6/site-packages/pycuda-0.94beta-py2.6-macosx-10.6- > i386.egg/pycuda/_driver.so: mach-o, but wrong architecture > > > > > _______________________________________________ > PyCUDA mailing list > [email protected] > http://tiker.net/mailman/listinfo/pycuda_tiker.net _______________________________________________ PyCUDA mailing list [email protected] http://tiker.net/mailman/listinfo/pycuda_tiker.net
