It did help :-)
I've installed MySQL-python-1.2.3c1.win-amd64-py2.6.exe distro, and it
worked right away. It's a shame they don't have those packages at
project's site at sourceforge!
Thanks a lot!

On Mar 14, 12:03 am, "mr.freeze" <nat...@freezable.com> wrote:
> This might 
> help:http://stackoverflow.com/questions/645943/mysql-for-python-in-windows
>
> On Mar 13, 2:59 pm, Igor Gassko <gas...@gmail.com> wrote:
>
>
>
> > Hello,
>
> > I have set up web2py source distribution on Windows 7 x64 with Python
> > 2.6. This distribution comes without preinstalled MySQL driver. I
> > followed the instructions found 
> > here:http://www.web2py.com/AlterEgo/default/show/133
> > by creating a folder structure %web2py\Lib\site-packages and placing
> > there the files from this 
> > archive:http://web2py.googlegroups.com/web/MySQL-python2.5.win32-binaries.zip
>
> > When I'm running: import MySQLdb in web shell, just tom make sure that
> > the package is available, I get:
>
> > Traceback (most recent call last):
> >   File "<input>", line 1, in <module>
> >   File "D:\Work\web2py_src\site-packages\MySQLdb\__init__.py", line
> > 19, in <module>
> >     import _mysql
> >   File "D:\Work\web2py_src\site-packages\_mysql.py", line 7, in
> > <module>
> >     __bootstrap__()
> >   File "D:\Work\web2py_src\site-packages\_mysql.py", line 6, in
> > __bootstrap__
> >     imp.load_dynamic(__name__,__file__)
> > ImportError: DLL load failed: %1 is not a valid Win32 application.
>
> > When I try to invoke any controller within the application using MySQL
> > in its model, I get:
>
> > Traceback (most recent call last):
> >   File "D:\Work\web2py_src\gluon\restricted.py", line 173, in
> > restricted
> >     exec ccode in environment
> >   File "D:/Work/web2py_src/applications/myapp/models/db.py", line 3,
> > in <module>
> >     db = DAL('mysql://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
> >   File "D:\Work\web2py_src\gluon\sql.py", line 3783, in DAL
> >     db_codec=db_codec, check_reserved=check_reserved)
> >   File "D:\Work\web2py_src\gluon\sql.py", line 919, in __init__
> >     self._pool_connection(lambda : MySQLdb.Connection(
> >   File "D:\Work\web2py_src\gluon\sql.py", line 829, in
> > _pool_connection
> >     self._connection = f()
> >   File "D:\Work\web2py_src\gluon\sql.py", line 919, in <lambda>
> >     self._pool_connection(lambda : MySQLdb.Connection(
> > NameError: global name 'MySQLdb' is not defined
>
> > I don't think this is how it's meant to be. Is there any *proper* way
> > to install this stuff under python 2.6?
> > Any help will be greatly appreciated!

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to