[Pythonmac-SIG] 64-bit mode no work
Lars Clausen
lars at raeder.dk
Sat Feb 21 16:53:24 CET 2009
I've been trying to get mod_python and mysql to work on my Intel
MacBook Leopard, but with very little luck. Disliking the idea of
turning my MySQL and Apache into 32-bit (seems backwards), I have
installed 64-bit versions of everything:
Hedwig:~ larsrc$ file `which python`
/usr/bin/python: Mach-O 64-bit executable x86_64
Hedwig:~ larsrc$ file /usr/libexec/apache2/mod_python.so
/usr/libexec/apache2/mod_python.so: Mach-O 64-bit bundle x86_64
Hedwig:~ larsrc$ file /Library/WebServer/.python-eggs/
MySQL_python-1.2.2-py2.6-macosx-10.5-universal.egg-tmp/_mysql.so
/Library/WebServer/.python-eggs/MySQL_python-1.2.2-py2.6-macosx-10.5-
universal.egg-tmp/_mysql.so: Mach-O universal binary with 4
architectures
/Library/WebServer/.python-eggs/MySQL_python-1.2.2-py2.6-macosx-10.5-
universal.egg-tmp/_mysql.so (for architecture i386): Mach-O bundle i386
/Library/WebServer/.python-eggs/MySQL_python-1.2.2-py2.6-macosx-10.5-
universal.egg-tmp/_mysql.so (for architecture ppc): Mach-O bundle ppc
/Library/WebServer/.python-eggs/MySQL_python-1.2.2-py2.6-macosx-10.5-
universal.egg-tmp/_mysql.so (for architecture ppc64): Mach-O 64-bit
bundle ppc64
/Library/WebServer/.python-eggs/MySQL_python-1.2.2-py2.6-macosx-10.5-
universal.egg-tmp/_mysql.so (for architecture x86_64): Mach-O 64-bit
bundle x86_64
Hedwig:~ larsrc$ file `which httpd`
/usr/sbin/httpd: Mach-O 64-bit executable x86_64
Even so, when I try to load a .py page with mysqldb (using Publisher
-- the real reason I want Python!), I get the infamous
File "/Library/WebServer/Documents/Python/test.py", line 4, in
<module> import MySQLdb
File "build/bdist.macosx-10.5-universal/egg/MySQLdb/__init__.py", line
19, in <module>
File "build/bdist.macosx-10.5-universal/egg/_mysql.py", line 7, in
<module>
File "build/bdist.macosx-10.5-universal/egg/_mysql.py", line 6, in
__bootstrap__
ImportError: dynamic module does not define init function (init_mysql)
I have been perusing a number of related pages (in order to get things
to compile in the first place) that mostly seem to see this as a
problem of 32/64-bit incompatibility, but with the entire stack being
64-bit, surely it's something else. Any ideas?
Any ideas also why there is no 64-bit installation of Python for Mac?
Given the presence of fat binaries, it seems like it would be a
trivial task to have it.
As an aside, I got so fed up with trying to fix this that I switched
briefly to IntelliJ + Java to implement my webservices. By the time I
had gone through the tutorial to set up a sample web service, I had 6
xml files in play but not a working web service. Publisher is just
exemplary in its simplicity.
Thanks in advance,
-Lars
More information about the Pythonmac-SIG
mailing list