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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:52:07+00:00 2026-05-13T05:52:07+00:00

I am having a problem installing the Python MySQL connector (MySQL-python-1.2.3c1) on my Mac

  • 0

I am having a problem installing the Python MySQL connector (MySQL-python-1.2.3c1) on my Mac OSX Snow Leopard.

System State

I have manually compiled an installed:
mysql-5.1.41

This seems to work fine, as I can create and query a database from the commandline.

I have compiled:
MySQL-python-1.2.3c1

I first set the following in the site.cfg file:

mysql_config = /usr/local/mysql/bin/mysql_config

I then built and compiled MySQL-python-1.2.3c1 following their guide:

sudo python setup.py build
sudo python setup.py install

I now test the installation with Python:

python -c "import MySQLdb"

Error Message

This then gives me the following error, and I’m stumped as to how to fix it:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "build/bdist.macosx-10.6-universal/egg/MySQLdb/__init__.py", line 19, in <module>
  File "build/bdist.macosx-10.6-universal/egg/_mysql.py", line 7, in <module>
  File "build/bdist.macosx-10.6-universal/egg/_mysql.py", line 6, in __bootstrap__
ImportError: dlopen(/Users/username/.python-eggs/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so, 2): Symbol not found: _mysql_affected_rows
  Referenced from: /Users/username/.python-eggs/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so
  Expected in: flat namespace
 in /Users/username/.python-eggs/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so
mymac: username$ 

Things I’ve Tried

I’ve looked at this blog antoniocangiano.com but it is for an older version of MySQL-python and is not really applicable. But I tried adding the soft link it mentions.

I then looked at this blog post: http://blog.some-abstract-type.com/2009/09/mysql-python-and-mac-os-x-106-snow.html. And tried building compiling with the ARCHFLAGS settings – but no joy.

Please Help

If you have any ideas please let me know.

Many thanks

Ben…

  • 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-13T05:52:07+00:00Added an answer on May 13, 2026 at 5:52 am

    First, I would suggest using the MySQL binaries for MacOS X 10.5 64-bit (x86_64). The tar ball works on MacOS X 10.6.

    You said you used ARCHFLAGS.. however, try it again like this:

    shell> ARCHFLAGS="-arch x86_64" python setup.py build
    shell> sudo python setup.py install
    

    Thus building as normal user, installing as root. (It’s good to remove the source, and unpack correcting the site.cfg file again).

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

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I dont think it's possible to switch to another activity… May 14, 2026 at 8:34 pm
  • Editorial Team
    Editorial Team added an answer $values = array(); $q = "SELECT * FROM table"; $resu… May 14, 2026 at 8:34 pm
  • Editorial Team
    Editorial Team added an answer The answer is its not supported yet. Simply pygtkglext doesn't… May 14, 2026 at 8:34 pm

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.