Hi folks,
I'm fairly new to Python and psyco, so forgive me if the answer should
have been obvious.
I'm trying to install psyco on an Intel-based Mac running OS X 10.6 Snow
Leopard. Since I couldn't find a binary package, I tried to build it
from source. This wouldn't work either with the raw source (stable or
Subversion) or through DarwinPorts: apparently the setup.py wants to
build it as a PPC-i386-x86_64 bundle, which fails due to lack of support
for 64-bit and non-Intel architecture.
By manually running gcc with all required options except the offending
-arch ppc and -arch x86_64, I finally succeeded in building the psyco
shared object, after which python setup.py install took care of copying
the file to the proper place. But the tests don't work:
$ python life.py
Traceback (most recent call last):
File "life.py", line 20, in <module>
import psyco; psyco.full()
File "/Library/Python/2.6/site-packages/psyco/__init__.py", line 46,
in <module>
raise ImportError, str(e) + extramsg
ImportError: dlopen(/Library/Python/2.6/site-packages/psyco/_psyco.so,
2): no suitable image found. Did find:
/Library/Python/2.6/site-packages/psyco/_psyco.so: mach-o, but wrong
architecture (check that the compiled extension
'/Library/Python/2.6/site-packages/psyco/_psyco.so' is for the correct
Python version; this is Python 2.6.1)
I think the problem might be that the python interpreter is built as a
bundle and I'm probably running the x86_64 version - which doesn't
properly load the 32-but psyco. Is there a fix for that? Or maybe I'm
totally wrong and the solution is much simpler?
Cheers,
Alain Borel
|