<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: MySQLdb on Leopard</title>
	<atom:link href="http://www.davidcramer.net/code/57/mysqldb-on-leopard.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.davidcramer.net/code/57/mysqldb-on-leopard.html</link>
	<description>A blog about Django, JavaScript, CSS, and general web development.</description>
	<lastBuildDate>Fri, 12 Mar 2010 19:46:01 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: hillscottc</title>
		<link>http://www.davidcramer.net/code/57/mysqldb-on-leopard.html/comment-page-1#comment-21670</link>
		<dc:creator>hillscottc</dc:creator>
		<pubDate>Mon, 11 Jan 2010 05:47:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/other/57/mysqldb-on-leopard.html#comment-21670</guid>
		<description>I am also totally frustrated with 
ImportError: dynamic module does not define init function (init_mysql)

@ssteinerX , I see you got it fixed, but what you actually did isn&#039;t clear to me. I also don&#039;t want to &#039;downgrade&#039; to 32 bit. Can you please explain &quot;just install the one with the right architecture&quot; ?</description>
		<content:encoded><![CDATA[<p>I am also totally frustrated with<br />
ImportError: dynamic module does not define init function (init_mysql)</p>
<p>@ssteinerX , I see you got it fixed, but what you actually did isn&#8217;t clear to me. I also don&#8217;t want to &#8216;downgrade&#8217; to 32 bit. Can you please explain &#8220;just install the one with the right architecture&#8221; ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ssteinerX</title>
		<link>http://www.davidcramer.net/code/57/mysqldb-on-leopard.html/comment-page-1#comment-21235</link>
		<dc:creator>ssteinerX</dc:creator>
		<pubDate>Thu, 31 Dec 2009 14:45:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/other/57/mysqldb-on-leopard.html#comment-21235</guid>
		<description>I had the same problem, then noticed that I was installing with &#039;sudo&#039; while building as my regular user.

See: http://websaucesoftware.com/blog/?p=461 and part 2 at http://websaucesoftware.com/blog/?p=462

No need to change to 32 bit mode and screw everything up, just install the one with the right architecture!</description>
		<content:encoded><![CDATA[<p>I had the same problem, then noticed that I was installing with &#8217;sudo&#8217; while building as my regular user.</p>
<p>See: <a href="http://websaucesoftware.com/blog/?p=461" rel="nofollow">http://websaucesoftware.com/blog/?p=461</a> and part 2 at <a href="http://websaucesoftware.com/blog/?p=462" rel="nofollow">http://websaucesoftware.com/blog/?p=462</a></p>
<p>No need to change to 32 bit mode and screw everything up, just install the one with the right architecture!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: muanis</title>
		<link>http://www.davidcramer.net/code/57/mysqldb-on-leopard.html/comment-page-1#comment-20815</link>
		<dc:creator>muanis</dc:creator>
		<pubDate>Sat, 13 Jun 2009 23:56:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/other/57/mysqldb-on-leopard.html#comment-20815</guid>
		<description>I&#039;ve got the same problem. 

Running mysql 5.1.35. After discovering that I should change to 32 bit version, repeated all the steps and got the same error about the init function.

&gt;&gt;&gt; import MySQLdb
  import sys, pkg_resources, imp
Traceback (most recent call last):
  File &quot;&quot;, line 1, in 
  File &quot;MySQLdb/__init__.py&quot;, line 19, in 
    import _mysql
  File &quot;build/bdist.macosx-10.5-i386/egg/_mysql.py&quot;, line 7, in 
  File &quot;build/bdist.macosx-10.5-i386/egg/_mysql.py&quot;, line 6, in __bootstrap__
ImportError: dynamic module does not define init function (init_mysql)


After a couple of hours debugging I noticed that the dist and build dirs of MySQLdb 1.2.2 were not removed when I issue a python setup.py clean.

I manually removed both of them and got everything working fine.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve got the same problem. </p>
<p>Running mysql 5.1.35. After discovering that I should change to 32 bit version, repeated all the steps and got the same error about the init function.</p>
<p>&gt;&gt;&gt; import MySQLdb<br />
  import sys, pkg_resources, imp<br />
Traceback (most recent call last):<br />
  File &#8220;&#8221;, line 1, in<br />
  File &#8220;MySQLdb/__init__.py&#8221;, line 19, in<br />
    import _mysql<br />
  File &#8220;build/bdist.macosx-10.5-i386/egg/_mysql.py&#8221;, line 7, in<br />
  File &#8220;build/bdist.macosx-10.5-i386/egg/_mysql.py&#8221;, line 6, in __bootstrap__<br />
ImportError: dynamic module does not define init function (init_mysql)</p>
<p>After a couple of hours debugging I noticed that the dist and build dirs of MySQLdb 1.2.2 were not removed when I issue a python setup.py clean.</p>
<p>I manually removed both of them and got everything working fine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kévin Dunglas</title>
		<link>http://www.davidcramer.net/code/57/mysqldb-on-leopard.html/comment-page-1#comment-20784</link>
		<dc:creator>Kévin Dunglas</dc:creator>
		<pubDate>Fri, 24 Apr 2009 11:09:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/other/57/mysqldb-on-leopard.html#comment-20784</guid>
		<description>Your link to download MySQL 5.0.41 is dead.
You can get the tarball from http://downloads.mysql.com/archives.php?p=mysql-5.0&amp;v=5.0.41</description>
		<content:encoded><![CDATA[<p>Your link to download MySQL 5.0.41 is dead.<br />
You can get the tarball from <a href="http://downloads.mysql.com/archives.php?p=mysql-5.0&amp;v=5.0.41" rel="nofollow">http://downloads.mysql.com/archives.php?p=mysql-5.0&amp;v=5.0.41</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul B. Hartzog</title>
		<link>http://www.davidcramer.net/code/57/mysqldb-on-leopard.html/comment-page-1#comment-20782</link>
		<dc:creator>Paul B. Hartzog</dc:creator>
		<pubDate>Thu, 23 Apr 2009 06:29:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/other/57/mysqldb-on-leopard.html#comment-20782</guid>
		<description>http://www.newtonslore.com/2007/06/09/mysqldb-lays-an-egg/

will get you through the egg errors</description>
		<content:encoded><![CDATA[<p><a href="http://www.newtonslore.com/2007/06/09/mysqldb-lays-an-egg/" rel="nofollow">http://www.newtonslore.com/2007/06/09/mysqldb-lays-an-egg/</a></p>
<p>will get you through the egg errors</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pvc</title>
		<link>http://www.davidcramer.net/code/57/mysqldb-on-leopard.html/comment-page-1#comment-22047</link>
		<dc:creator>pvc</dc:creator>
		<pubDate>Tue, 27 Jan 2009 00:05:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/other/57/mysqldb-on-leopard.html#comment-22047</guid>
		<description>The _mysql.so ImportError on init_mysql puzzeled my for a while until I discovered that &quot;python setup.py clean&quot; does not do a complete job of discarding the prior build. If you previously built against a 64 bit library of mysql you need to manually delete everything below the build directory before doing a new build with the 32 bit version.</description>
		<content:encoded><![CDATA[<p>The _mysql.so ImportError on init_mysql puzzeled my for a while until I discovered that &#8220;python setup.py clean&#8221; does not do a complete job of discarding the prior build. If you previously built against a 64 bit library of mysql you need to manually delete everything below the build directory before doing a new build with the 32 bit version.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Install Python MySQL db module? &#124; keyongtech</title>
		<link>http://www.davidcramer.net/code/57/mysqldb-on-leopard.html/comment-page-1#comment-20613</link>
		<dc:creator>Install Python MySQL db module? &#124; keyongtech</dc:creator>
		<pubDate>Sun, 18 Jan 2009 16:40:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/other/57/mysqldb-on-leopard.html#comment-20613</guid>
		<description>[...] -Conrad  I tried this a couple of weeks ago using macports and had problems.  See, for example:  http://www.davidcramer.net/code/57/m...n-leopard.html  I read about several people who went in and edited the source files to work out the bugs on [...]</description>
		<content:encoded><![CDATA[<p>[...] -Conrad  I tried this a couple of weeks ago using macports and had problems.  See, for example:  <a href="http://www.davidcramer.net/code/57/m...n-leopard.html" rel="nofollow">http://www.davidcramer.net/code/57/m&#8230;n-leopard.html</a>  I read about several people who went in and edited the source files to work out the bugs on [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How to finally fix that damned MySQLdb module on Leopard &#171; Nerd Stuff</title>
		<link>http://www.davidcramer.net/code/57/mysqldb-on-leopard.html/comment-page-1#comment-20612</link>
		<dc:creator>How to finally fix that damned MySQLdb module on Leopard &#171; Nerd Stuff</dc:creator>
		<pubDate>Sun, 18 Jan 2009 10:50:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/other/57/mysqldb-on-leopard.html#comment-20612</guid>
		<description>[...] David Cramer.net - MySQLdb on Leopard [...]</description>
		<content:encoded><![CDATA[<p>[...] David Cramer.net &#8211; MySQLdb on Leopard [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: indiehead</title>
		<link>http://www.davidcramer.net/code/57/mysqldb-on-leopard.html/comment-page-1#comment-20589</link>
		<dc:creator>indiehead</dc:creator>
		<pubDate>Tue, 30 Dec 2008 02:01:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/other/57/mysqldb-on-leopard.html#comment-20589</guid>
		<description>Great work, unfortunately didn&#039;t work this end, any ideas?

indiehead:MySQL-python-1.2.2 indiehead$ sudo python setup.py install
running install
running bdist_egg
running egg_info
writing MySQL_python.egg-info/PKG-INFO
writing top-level names to MySQL_python.egg-info/top_level.txt
writing dependency_links to MySQL_python.egg-info/dependency_links.txt
reading manifest file &#039;MySQL_python.egg-info/SOURCES.txt&#039;
reading manifest template &#039;MANIFEST.in&#039;
writing manifest file &#039;MySQL_python.egg-info/SOURCES.txt&#039;
installing library code to build/bdist.macosx-10.5-i386/egg
running install_lib
running build_py
copying MySQLdb/release.py -&gt; build/lib.macosx-10.5-i386-2.5/MySQLdb
running build_ext
building &#039;_mysql&#039; extension
creating build/temp.macosx-10.5-i386-2.5
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -pipe -Dversion_info=(1,2,2,&#039;final&#039;,0) -D__version__=1.2.2 -I/usr/local/mysql/include -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c _mysql.c -o build/temp.macosx-10.5-i386-2.5/_mysql.o -g -Os -arch i386 -fno-common -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT
_mysql.c:37: error: syntax error before ‘uint’
_mysql.c:38: error: syntax error before ‘unsigned’
In file included from /usr/local/mysql/include/mysql.h:47,
                 from _mysql.c:40:
/usr/include/sys/types.h:84: error: syntax error before ‘typedef’
_mysql.c:485:3: error: invalid preprocessing directive #uint
_mysql.c:486:3: error: invalid preprocessing directive #uint
error: command &#039;gcc&#039; failed with exit status 1</description>
		<content:encoded><![CDATA[<p>Great work, unfortunately didn&#8217;t work this end, any ideas?</p>
<p>indiehead:MySQL-python-1.2.2 indiehead$ sudo python setup.py install<br />
running install<br />
running bdist_egg<br />
running egg_info<br />
writing MySQL_python.egg-info/PKG-INFO<br />
writing top-level names to MySQL_python.egg-info/top_level.txt<br />
writing dependency_links to MySQL_python.egg-info/dependency_links.txt<br />
reading manifest file &#8216;MySQL_python.egg-info/SOURCES.txt&#8217;<br />
reading manifest template &#8216;MANIFEST.in&#8217;<br />
writing manifest file &#8216;MySQL_python.egg-info/SOURCES.txt&#8217;<br />
installing library code to build/bdist.macosx-10.5-i386/egg<br />
running install_lib<br />
running build_py<br />
copying MySQLdb/release.py -&gt; build/lib.macosx-10.5-i386-2.5/MySQLdb<br />
running build_ext<br />
building &#8216;_mysql&#8217; extension<br />
creating build/temp.macosx-10.5-i386-2.5<br />
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -pipe -Dversion_info=(1,2,2,&#8217;final&#8217;,0) -D__version__=1.2.2 -I/usr/local/mysql/include -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c _mysql.c -o build/temp.macosx-10.5-i386-2.5/_mysql.o -g -Os -arch i386 -fno-common -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT<br />
_mysql.c:37: error: syntax error before ‘uint’<br />
_mysql.c:38: error: syntax error before ‘unsigned’<br />
In file included from /usr/local/mysql/include/mysql.h:47,<br />
                 from _mysql.c:40:<br />
/usr/include/sys/types.h:84: error: syntax error before ‘typedef’<br />
_mysql.c:485:3: error: invalid preprocessing directive #uint<br />
_mysql.c:486:3: error: invalid preprocessing directive #uint<br />
error: command &#8216;gcc&#8217; failed with exit status 1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emily</title>
		<link>http://www.davidcramer.net/code/57/mysqldb-on-leopard.html/comment-page-1#comment-20455</link>
		<dc:creator>Emily</dc:creator>
		<pubDate>Mon, 10 Nov 2008 22:08:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/other/57/mysqldb-on-leopard.html#comment-20455</guid>
		<description>I&#039;m having the same ImportError problem as well, but I&#039;ve checked that mysql, python, and _mysql.so in the MySQLdb egg are all 32-bit. Everything I&#039;ve found googling this problem has indicated the same solution that&#039;s been suggested here: that the architectures don&#039;t match. Any other suggestions or anything else that might be 64-bit and causing the problem?</description>
		<content:encoded><![CDATA[<p>I&#39;m having the same ImportError problem as well, but I&#39;ve checked that mysql, python, and _mysql.so in the MySQLdb egg are all 32-bit. Everything I&#39;ve found googling this problem has indicated the same solution that&#39;s been suggested here: that the architectures don&#39;t match. Any other suggestions or anything else that might be 64-bit and causing the problem?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
