Yes, a little more involved that I remembered. So, to go through the
steps correctly, I started from scratch. This is what I did:

1) downloaded latest version of MySQLdb form 
http://sourceforge.net/projects/mysql-python/
2) went to my default Python folder, and checked for any file or
folder with a reference to *MySQL* (remove if any)
3) opened Vim in a terminal, opened setup_posix.py and made this
change (you may not have to do this if MySQL was already installed -
but i changed it anyways):

       <----- changed this line
       mysql_config.path = "mysql_config"


       ------> to this
       mysql_config.path = "/usr/local/mysql/bin/mysql_config"

4) ran these at the terminal:
           python setup.py clean
           python setup.py build
           sudo python setup.py install


5) for good measure, did an export:  export PATH=/usr/local/mysql/bin:
$PATH

and there you have it. MyQSLdb is ready to be imported!

good luck and feel free to ask, if you would like me to test a
different way of getting it insalled.

Mart :)






On Oct 18, 1:49 am, mart <msenecal...@gmail.com> wrote:
> hum.. let me check on my end to make sure I didn't miss mentioning
> something. It has been a little while...
>
> On Oct 18, 12:40 am, Franklin Freitas <freitas.frank...@gmail.com>
> wrote:
>
> > Hi, the thing is that MySQLdb is not even working outside the Web2py
> > environment. I haven't been able to make it work in the regular Python
> > interpreter. I tried copying everything to the Web2py sites-packages
> > folder, but it didn't work
>
> > Thanks
>
> > Franklin
>
> > On Oct 17, 8:03 pm, mart <msenecal...@gmail.com> wrote:
>
> > > you can throw in in the installed python/lib folder, or in site-
> > > packages folder (sibling to the applications folder of the web2py root
> > > dir, or do an export within your scripts (controller?),or.... my
> > > favorite, I usually do web2py stuff with Aptana,so, i throw of copy of
> > > all dependencies within my project and reference it there... so, many
> > > possibilities, depends how you prefer to reference it....
>
> > > Hope it helps,
> > > Mart :)
>
> > > On Oct 17, 7:11 pm, Franklin Freitas <freitas.frank...@gmail.com>
> > > wrote:
>
> > > > Has anyone been able to install MySQLdb in Mac OSX ???
>
> > > > I want to use it with Web2py but haven't been able to make it work.
> > > > I've read a whole bunch of forums saying how hard it is, I've done
> > > > everything I've reead about it without any results. I even used
> > > > macports as recommended by my Web2py teacher but it didn't work
> > > > either.
>
> > > > If anyone knows a sure way on how to achieve this I would appreciate
> > > > it.
>
> > > > Thanks for your time
>
>

Reply via email to