Hello Igor; Please note that I don't work with 64-bit systems, but I'll try to help you get MySQL-python working.
You say that you are using web2py from source, which means that you have python installed on your system. See here on how to setup setuptools/easy_install: http://pypi.python.org/pypi/setuptools And then use easy_install to install MySQL-python. -rppowell On Mar 13, 12:59 pm, Igor Gassko <[email protected]> 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.

