[egenix-users] eclipse unresovled import and print_resultset

M.-A. Lemburg mal at egenix.com
Mon Aug 31 15:30:49 CEST 2009

Raful CIV Mitchell H wrote:
> In Eclipse, I get an unresolved import using mx.ODBC.unixODBC.  I also noticed that the install placed everything in /usr/local/lib64/site-packages instead of the system wide '/usr/lib64/python 2.6/site-packages'.  Is there something I can do to configure the install directory in advance.

On Linux, you typically only have one of the two popular ODBC
managers iODBC and unixODBC installed.

Consequently, mxODBC will only find one of them and raise an ImportError
for the other.

You only have an installation problem if both mx.ODBC.iODBC and
mx.ODBC.unixODBC fail to import.

Regarding the installation location defaults: you can change the
location of the installation using the --prefix option of
the "install" command:

python setup.py install --prefix=/usr

should install everything under the system Python installation
path on your system.

If you want to test this prior to running the real installation,
you should use a temporary directory as target, e.g.

python setup.py install --prefix=/tmp/usr

> While I  have a result set and can loop through it, the print_result set returns and error which states that the global variable string in Helpers.py is not defined.  ( I am querying against MS Sql Server 2000.)

This is a regression that was introduced in mxODBC 3.0.2 due to some
refactoring we've done. It will be fixed in version 3.0.3 which is due
to be released this week.

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Aug 31 2009)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611

More information about the egenix-users mailing list