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 6186895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:58:05+00:00 2026-05-24T01:58:05+00:00

I am trying to install MySQLdb python and am having trouble getting it to

  • 0

I am trying to install MySQLdb python and am having trouble getting it to work because I get an architecture error.

>>> import MySQLdb
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.macosx-10.6-x86_64/egg/MySQLdb/__init__.py", line 19, in <module>
  File "build/bdist.macosx-10.6-x86_64/egg/_mysql.py", line 7, in <module>
  File "build/bdist.macosx-10.6-x86_64/egg/_mysql.py", line 6, in __bootstrap__
ImportError: dlopen(/Users/jkeesh/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.6-x86_64.egg-tmp/_mysql.so, 2): no suitable image found.  Did find:
    /Users/jkeesh/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.6-x86_64.egg-tmp/_mysql.so: mach-o, but wrong architecture

This has been a common question, and I have read many, many sources including:

Python MySQL wrong architecture error

http://www.mechanicalgirl.com/view/installing-django-with-mysql-on-mac-os-x/

Django + MySQL on Mac OS 10.6.2 Snow Leopard

Installing MySQLdb on Mac OS X

and many other links.

It appears that the problem is a 32-bit 64-bit mismatch, but I’m not sure what the right combination is, or what exactly the mismatch is.

I have installed from pip, from Mac ports, and built from the source. I have tried setting the ARCHFLAGS to both i386 and and x86_64.

I have tried setting VERSIONER_PYTHON_PREFER_32_BIT and VERSIONER_PYTHON_PREFER_64_BIT preferences.

I am running Mac OS X 10.6.6

I have mysql installed in /usr/local/mysql

$ file $(which ./mysql)
   ./mysql: Mach-O executable i386

I have mysql version 5.5.12

I have 64 bit Python 2.6.6.

My system architecture is:

>>> platform.platform()
'Darwin-10.6.0-i386-64bit'

$ file $(which python) 
   /opt/local/bin/python: Mach-O 64-bit executable x86_64

If there are any links you can point me to or suggestions to try I would really appreciate it. I’m kind of at a dead end and getting the same “wrong architecture” error no matter what I try.

  • 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-24T01:58:05+00:00Added an answer on May 24, 2026 at 1:58 am

    I’ve solved my own question, so hopefully this can be of help to people with similar issues.

    I believe I had a 32-bit mysql installation.

    I uninstalled all versions of mysql that I had

    I went back and installed mysql 5.1 from the source, but I think a mysql 5.1 x86_64 bit dmg or binary would work also.

    I used this make command from this post http://hivelogic.com/articles/compiling-mysql-on-snow-leopard/

    I had permission issues and finally got it working using

    sudo mysqld_safe --skip-grant-tables &
    

    I installed MySQL-python 1.2.3c1 from here

    http://pypi.python.org/pypi/MySQL-python/1.2.3c1

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

Sidebar

Related Questions

I'm trying to install MySQLdb with Python 2.7. The error I'm getting looks like
I am a .NET developer trying to install mysqldb for python I keep having
Trying to install pear package and keep getting this strange error. Can you shed
Trying to install mysql-python. Got following error. Got mysql and pythond already installed. Any
When trying to install a package in R I get the following odd error
Trying to install mysql2 gem on ruby 1.9.2 and I get this error: Installing
I'm trying install pycrypto on osx with easy_install and I'm getting the following error:
I've spent several hours trying to install MySQLdb (the Python library) on Mac OS
I am trying to install MySQLdb for Python 2.6 as per these instructions: http://www.tutorialspoint.com/python/python_database_access.htm
I'm trying to install MySQLdb for python on Cygwin. Unfortunately, when I run python

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.