I had this same problem, i eventually abandoned building any of it manually and switched to macports: http://groups.google.com/group/django-users/browse_thread/thread/862ceed6f97acf1c/eeff8aa5fb16ca0c#eeff8aa5fb16ca0c. If you read the thread no one agrees with me, but its working great for me so far. Since I'm a noob as well, it could prove a mistake down the road.
However I did fix the build problem before i abandoned it. I had to make some symbolic links so that /usr/local/mysql pointed to my actual install where mysql was installed. riuxjg:local jgreenaw$ ls -l /usr/local/mysql/ total 8 lrwxr-xr-x 1 root wheel 27 Jan 20 14:01 lib -> /opt/local/lib/ mysql5/mysql so something like this: cd /usr/local sudo ln -s opt/local/lib/mysql5/mysql mysql If you look in the build its actually looking for the _mysql.so file which is somewhere in your mysql install directory. hope it helps. On Feb 5, 7:40 am, monchi <supermon...@gmail.com> wrote: > Hi there, > > I'm a first time Django user, trying to set up Django on my Mac 10.5.8 > Leopard with MySQL from MAMP. > Is this actually possible? > > I managed to get the welcome message from Django install, so that's > working, I assume. > > Next, MySQL, I got this: > ====>>> import MYSQLdb > > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > ImportError: No module named MYSQLdb > ==== > > I went and downloaded the mysql-python-1.2.3c1, unpacked it, tried to > build it, and got this error: > > ==== > running build > running build_py > copying MySQLdb/release.py -> build/lib.macosx-10.5-i386-2.5/MySQLdb > running build_ext > building '_mysql' extension > gcc -Wl,-F. -bundle -undefined dynamic_lookup -arch i386 -arch ppc > build/temp.macosx-10.5-i386-2.5/_mysql.o -L/Applications/MAMP/Library/ > lib/mysql -lmysqlclient_r -lz -lm -o build/lib.macosx-10.5-i386-2.5/ > _mysql.so > ld: library not found for -lmysqlclient_r > collect2: ld returned 1 exit status > ld: library not found for -lmysqlclient_r > collect2: ld returned 1 exit status > lipo: can't open input file: /var/folders/sE/sEdFajpBFXergJVaiXZyfU++ > +TI/-Tmp-//cc1NtAuY.out (No such file or directory) > error: command 'gcc' failed with exit status 1 > ==== > > I also tried the older version, mysql-python-1.2.2, got the unsigned > error, commented out lines 37-39 as suggested by many, which worked, > but got this similar error: > > ==== > running build > running build_py > copying MySQLdb/release.py -> build/lib.macosx-10.5-i386-2.5/MySQLdb > running build_ext > building '_mysql' extension > gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- > madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes - > DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch i386 -arch ppc -pipe - > Dversion_info=(1,2,2,'final',0) -D__version__=1.2.2 -I/Applications/ > MAMP/Library/include/mysql -I/System/Library/Frameworks/ > Python.framework/Versions/2.5/include/python2.5 -c _mysql.c -o build/ > temp.macosx-10.5-i386-2.5/_mysql.o -fno-omit-frame-pointer - > D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ - > DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL > gcc -Wl,-F. -bundle -undefined dynamic_lookup -arch i386 -arch ppc > build/temp.macosx-10.5-i386-2.5/_mysql.o -L/Applications/MAMP/Library/ > lib/mysql -lmysqlclient_r -lz -lm -o build/lib.macosx-10.5-i386-2.5/ > _mysql.so > ld: library not found for -lmysqlclient_r > collect2: ld returned 1 exit status > ld: library not found for -lmysqlclient_r > collect2: ld returned 1 exit status > lipo: can't open input file: /var/folders/sE/sEdFajpBFXergJVaiXZyfU++ > +TI/-Tmp-//ccV4OFgQ.out (No such file or directory) > error: command 'gcc' failed with exit status 1 > ==== > > How can I get around the "ld: library not found for -lmysqlclient_r" > error? > What am I missing or doing wrong? > > Many have also suggested to use SQLite. At this rate I'm willing to > give it a try, though I would much prefer MySQL MAMP/XAMPP alternative > if it's possible at all. > > Thanks for your help, I'm looking forward to your advise. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.