I am trying to run web2py in Ubuntu (making a shift from MS-Windows).
It has, of course, Python 2.6.
Since I require MySQLdb for a third party lib, I did setup MySQL 5512
and MySQLdb from 'Ubuntu Software Centre'.

>> import dabo
>> import MySQLdb
works OK.  No error.

But while establishing a connection, is says that there is a mismatch
in versions of MySQLdb & _mysql.

ImportError: this is MySQLdb version (1, 2, 3, 'gamma', 1), but _mysql
is version (1, 2, 2, 'final', 0)

Can you please help me solve this?

Complete traceback ---->

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "dabovmd/hotel.py", line 4, in <module>
    empconn = dabo.db.dConnection(empci)
  File "dabo/db/dConnection.py", line 32, in __init__
    self._connection = self._openConnection(**kwargs)
  File "dabo/db/dConnection.py", line 80, in _openConnection
    return
self._connectInfo.getConnection(forceCreate=self._forceCreate,
**kwargs)
  File "dabo/db/dConnectInfo.py", line 105, in getConnection
    return self._backendObject.getConnection(self, **kwargs)
  File "dabo/db/dbMySQL.py", line 25, in getConnection
    import MySQLdb as dbapi
  File "/media/pyth/python26/Lib/site-packages/MySQLdb/__init__.py",
line 23, in <module>
    (version_info, _mysql.version_info))
ImportError: this is MySQLdb version (1, 2, 3, 'gamma', 1), but _mysql
is version (1, 2, 2, 'final', 0)

Thanks in advance,

Vineet Deodhar

Reply via email to