Those are great instructions, could you please upload them somewhere
more permanent. I'm not sure where will be the best but they could
start at the TG docs, or maybe virtualenv.

The real problem here is what your system's package mysqldb won't work
with the venv, and the egg version up on pypi will not work either.
Ideally I think someone should try to make a universal egg but I think
mysqldb needs to know several per system instalation paths (the config
file you needed) which may make it impossible to work with.

A shorter workaround (which I have used for quite some time) is to not
use the --no-site-packages flag and simply use the mysqldb from
ubuntu.

On Tue, Mar 10, 2009 at 5:42 AM, casibbald <[email protected]> wrote:
>
> Downloaded MySQL DB from here. 
> http://sourceforge.net/project/showfiles.php?group_id=22307
>
> Only version 1.2.2 works, the others give you so many issues.
>
> Then,
>
> # tar -xvzf MySQL-python-1.2.2.tar.gz
>
> # cd MySQL-python-1.2.2/
>
> you then need to set the location of the file mysql_config in your
> LD_LIBRARY path, make sure that the location below reflects your
> version of linux/ubuntu or what ever your doing this on.
> # export LD_LIBRARY_PATH=/usr/local/mysql/lib:$LD_LIBRARY_PATH
>
> # python setup.py build
>
> # sudo python setup.py install
>
> You should get a result like this:
> --> Installed /usr/lib/python2.5/site-packages/MySQL_python-1.2.2-
> py2.5-linux-x86_64.egg
> --> Processing dependencies for MySQL-python==1.2.2
>
> On my system I still could not find mysql_config, and eventually
> discovered that on ubuntu it comes in a seperate lib package called
> libmysqlclient15-dev.
>
> # sudo apt-get install libmysqlclient15-dev
>
>
>
>
> And then try
>
> # Python
> [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on charles-pc
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import MySQLdb
>>>>
>
> If you dont get an error then you have mysql DB.
>
> You can then run.
>
> # virtualenv --no-site-packages tg2env
> # cd tg2env/
> # source bin/activate
> # easy_install -i http://www.turbogears.org/2.0/downloads/current/index
> tg.devtools
>
> Hopefully you should have a working TG2.
> Oh one other issue, if you have TG1 installed on your PC, there is
> some Json stuff that has a version conflict, i did not bother to
> resolve that, i simply removed the old TD1.
>
> Hope this helps anyone else that faces the same problem.
>
>
>
> On Mar 9, 1:54 pm, Lukasz Szybalski <[email protected]> wrote:
>> It seems you need pythoin bindings for mysql.
>>
>> I thing it was called mysql-python or pymsql.
>>
>> Lucas
>>
>>
>>
>> On Mon, Mar 9, 2009 at 8:47 AM, Ben Sizer <[email protected]> wrote:
>>
>> > On Mar 9, 12:53 pm, casibbald <[email protected]> wrote:
>>
>> >> I do have mysqldb installed on my ubuntu machine, but it seems this
>> >> needs to be installed within the virtualenv as well, i tried
>> >> easy_install mysqldb, with no luck.
>>
>> > What does easy_install say when you try?
>>
>> > And did you create the virtualenv with the no-site-packages option? If
>> > so, ignoring your global site packages is by design.
>>
>> > If you can find the files that mysqldb uses in your main site-packages
>> > directory, it may be enough to copy those to your virtualenv site
>> > packages directory.
>>
>> > --
>> > Ben Sizer
>>
>> --
>> How to create python package?http://lucasmanual.com/mywiki/PythonPaste
>> Bazaar and Launchpadhttp://lucasmanual.com/mywiki/Bazaar
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to