mwolfe02
mwolfe02

Reputation: 24237

import pyodbc results in DLL load failed with error code 193 on Win7

I am running 64-bit Windows 7 and the ActiveState Python 2.5 installation (64-bit version). I just downloaded and installed the pyodbc 2.1.7 win32 package. When I run the installer as an admin it proceeds with no problem. When I run python and try

import pyodbc

I receive the following error:

ImportError: DLL load failed with error code 193

I'm thinking it has to do with having the 64-bit version of ActiveState Python installed. Do I need to remove that and replace it with the 32-bit ActiveState Python installation? Would that be the preferred way of doing things until more python packages have 64-bit support?

Upvotes: 1

Views: 4831

Answers (1)

Mark
Mark

Reputation: 108567

It shouldn't be too difficult to build yourself. I know pyodbc supports 64 bit (I worked with the author a bit adding 64 bit support a couple years ago). If unzip the source zip, you can run:

setup.py bdist_wininst 

Of course for Python 2.5, I think you'll need Visual Studio 2003, that's probably a deal-breaker. With python>=2.6, you could do it with Visual Studio Express 2008.

Upvotes: 1

Related Questions