Skip to content

Un-breaking the MySQLdb module after my Snow-Leopard upgrade

September 17, 2010

After a few days of trying, giving up for a few months, and a few hours of trying again, I have finally managed to regain the use of the MySQLdb python package, that was broken after y upgrade to Snow-Leopard several months ago.  It all seems so easy after you figure out what to do, but I wanted to document my journey and possibly save others the grief I went through.

    • Install XAMPP: Super simple really; just go to http://www.apachefriends.org/en/xampp-macosx.html and follow their instructions.
    • Add the XAMPP binary directory to your path: Add a line like this to your .*rc file:
      • export PATH=$PATH:/Applications/XAMPP/xamppfiles/bin
    • Download the source for MySQLdb: I like to download/extract all of these sorts of things into ~/local/src
      • Following the instructions from Eric Simmerman to the letter, we build and install MySQLdb
      • If you are using the default Snow-Leopard python (mine is 2.6.1), you will need to turn off 64-bit functionality in order to import the module.  You can do this by add this line to your .*rc file as well (I think this is equivalent to Eric’s #3):
        • export VERSIONER_PYTHON_PREFER_32_BIT=yes

      That did the trick for me.  On to brighter days, we def. could use more sun in Seattle this time of year.  Leave a comment if this was helpful for you too!

      -n

      Advertisement

      From → Computers

      Leave a Comment

      Leave a Reply

      Fill in your details below or click an icon to log in:

      WordPress.com Logo

      You are commenting using your WordPress.com account. Log Out / Change )

      Twitter picture

      You are commenting using your Twitter account. Log Out / Change )

      Facebook photo

      You are commenting using your Facebook account. Log Out / Change )

      Connecting to %s

      Follow

      Get every new post delivered to your Inbox.