Menu

1.2.1fc7 issues on Mac OS X (Intel)

2006-03-10
2012-09-19
  • Brett Powley

    Brett Powley - 2006-03-10

    I've just received my new Intel MacBook and have been trying to install MySQLdb 1.2.1fc7. There are a few issues which means that it doesn't work 'out of the box'; not bugs in MySQLdb, but things that might be worth mentioning in the build notes.

    (1) MySQL path
    The MySQL 4.1 installer (and possibly later ones) doesn't add MySQL to your PATH. This means that the MySQLdb build can't find mysql_config, and you will get compilation errors.

    The best solution to this is to add mysql to your PATH:
    export PATH=${PATH}:/usr/local/mysql/bin

    (2) ActivePython issues
    MySQLdb works fine with the default Python install provided by Apple (2.3.5), but it doesn't work with the ActivePython Intel install (2.4.2). Attempting to use it gives the following error:

    Traceback (most recent call last):
    File "citationanalyzer.py", line 12, in ?
    import MySQLdb
    File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/MySQLdb/init.py", line 19, in ?
    import _mysql
    ImportError: Failure linking new module: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/_mysql.so: Symbol not found: _mysql_get_host_info
    Referenced from: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/_mysql.so
    Expected in: dynamic lookup

    I haven't dug into this too deeply yet, but I believe it might have something to do with a mismatch in the way in which ActivePython and _mysql.so are being built.

    My solution for the moment is to go back to Apple's version of Python, but I'll keep looking for a better solution.

     
    • Brett Powley

      Brett Powley - 2006-03-15

      Replying to my own message here...

      The second error has gone away, so I can report that MySQLdb works with ActivePython 2.4 on Mac OS X (Intel). I am not sure what conspired to give the error the first time, but I'm guessing that it was a some combination of not having the PATH set correctly (so that the MySQLdb build script can find both the correct version of Python and MySQL).

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.