开发者

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

开发者 https://www.devze.com 2023-01-07 07:34 出处:网络
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 pr开发

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 pr开发者_运维技巧oceeds 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消