Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 611847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:49:42+00:00 2026-05-13T17:49:42+00:00

I’ve been happily using Django and MySQL in development on an existing machine running

  • 0

I’ve been happily using Django and MySQL in development on an existing machine running OS X 10.4 Tiger, and have set up a similar environment in 10.5 Leopard on a new 64-bit MacBook, with a working MySQL and Python 2.6.4.

However, now I want them to communicate, easy_install MySQL-python gave ld warnings that the file is not of the required architecture, which led me to test my Python 2.4.6 install (from the Mac OS X disc image):

>>> import sys
>>> sys.maxint
2147483647

Ah. So my Python install appears to be 32-bit and (I think?) won’t install MySQL-python for my 64-bit MySQL. There are lots of hacks out there for MySQL-python on OS X (mostly 1.2.2), but – after hours of reading – I’m pretty sure they won’t fix this architecture mismatch. So I’m stuck because I can’t decide whether to:

  • give up, remove the 64-bit MySQL install (thorough methods, please?) and use the 32-bit MySQL disc image instead;
  • re-install Python in 64-bit mode from the tarball,
    --with-universal archs-64-bit and --enable-universalsdk=
    as detailed in Python.org’s 2.6 news.

So my questions for anyone who has encountered this issue are:

  1. Is installing 64-bit Python on OS X 10.5 worth bothering with?
  2. If so, (naive, lazy question!) how are the two required arguments combined?
  3. If I just skip along in 32-bit (as on my working setup) what am I missing?

I’m after a hassle-free install that’s easy to reproduce on other machines (possible student use) so I’d really welcome your opinions, please!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T17:49:43+00:00Added an answer on May 13, 2026 at 5:49 pm

    I’m posting this here in case anyone finds this page and needs an answer…

    Solution: remove the MySQL 64-bit install (change the below to match your MySQL version number):

    cd /usr/local
    sudo rm -rf mysql-5.1.41-osx10.5-x86_64
    rm -r mysql
    cd /Library/Receipts/
    rm -r mysql-5.1.41-osx10.5-x86_64.pkg
    

    Install the latest 32-bit MySQL package from the downloads page and set it up as required.

    Remove MySQL-python with:

    easy_install -m MySQL-python
    

    Then delete the egg in site-packages and make sure easy_install -m removed the package line in the easy-install.pth file there.

    Start up MySQL, then re-install MySQL-python (make sure you get the latest version – 1.2.3 – at time of writing): easy_install MySQL-python

    Test it:

    >>> import MySQLdb
    

    For me, that solved the problem. No need to edit _mysql.c (as advised for MySQL-python 1.2.2) or mess with any other settings.

    Should you need them (if the above fails, or if you really want to try a 64-bit install), here are some of the links used while researching this:

    • Andy Dustman, MySQLdb developer
    • Django on Leopard
    • Jim B’s Blog: installing fresh version of python 2.6.4
    • Search results for setuptools ARCHFLAGS 32 bit – MarkMail
    • MySQL-Python and Apple OSX 10.5 (Leopard)
    • Installing Django / Python / Mysql on OS X | DavidMichaelThompson

    But note this:

    “if you go 64, then you will have to
    recompile every single thing that
    interacts with python, mysql and
    apache to work as a 64 bit arch
    program”

    And for anyone on Snow Leopard:

    • mysql-python and Snow Leopard
    • Python-MySQL for Snow Leopard

    Finally, the MacPython 2.7 installer now covers 64 bit. See this post for the differences between running 64 and/or 32 bit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 357k
  • Answers 357k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The other answers are correct. Here is some code you… May 14, 2026 at 9:40 am
  • Editorial Team
    Editorial Team added an answer you ruin the noConflict concept by reassigning the jquery to… May 14, 2026 at 9:40 am
  • Editorial Team
    Editorial Team added an answer If you get that particular error, you don't actually have… May 14, 2026 at 9:40 am

Related Questions

No related questions found

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.