The Artima Developer Community
Sponsored Link

Python Buzz Forum
MySQLdb, OSX and -lmysqlclient_r

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Victor Ng

Posts: 112
Nickname: victorng
Registered: Aug, 2003

Victor Ng programs Python for money, but he'd be programming Python anyway if he was a bum.
MySQLdb, OSX and -lmysqlclient_r Posted: Sep 24, 2003 7:51 AM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Victor Ng.
Original Post: MySQLdb, OSX and -lmysqlclient_r
Feed Title: Victor Ng's Weblog
Feed URL: https://blog.crankycoder.com/feed/atom/
Feed Description: Python Feed
Latest Python Buzz Posts
Latest Python Buzz Posts by Victor Ng
Latest Posts From Victor Ng's Weblog

Advertisement

The Python MySQLdb driver (0.9.2) doesn't build out of the box for OSX 10.2.8 and MacPython 2.3.

The last couple errors you'll get are:

gcc -Wl,-x -Wl,-F. -bundle -framework Python build/temp.darwin-6.6-Power_Macintosh-2.3/_mysql.o -L/usr/lib/mysql -L/usr/local/lib/mysql -L/usr/local/mysql/lib/mysql -L/sw/lib -lmysqlclient_r -lz -o build/lib.darwin-6.6-Power_Macintosh-2.3/_mysql.so -flat_namespace
ld: warning -L: directory name (/usr/lib/mysql) does not exist
ld: warning -L: directory name (/usr/local/lib/mysql) does not exist
ld: can't locate file for: -lmysqlclient_r
error: command 'gcc' failed with exit status 1

Changes you'll have to make to setup.py in MySQLdb:

     23 mysqlclient = thread_safe_library and "mysqlclient"
...
     25 # include files and library locations should cover most platforms
     26 include_dirs = [
     27     '/usr/local/mysql/include/mysql',
     28     ]
     29 library_dirs = [
     30     '/usr/local/mysql/lib/mysql',
     31     ]

Read: MySQLdb, OSX and -lmysqlclient_r

Topic: interactive Python shell Previous Topic   Next Topic Topic: connection matrix vs. node with edges for molecules

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use