0

I have just started using Python and have hit a bunch of issues , some of which I have resolved going through the answers on this forum but I have hit a wall with this one. Import odbc does not work for me at all. I keep getting an error :- import odbc ImportError: DLL load failed: The specified module could not be found

I have downloaded the whl file from https://pypi.python.org/pypi/pywin32 pywin32-222-cp36-cp36m-win32.whl and installed it using pip (using the tip suggested by Sushant in Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)).

I can see the odbc.pyd file within the Python36-32\Lib\site-packages\win32 and I can see the sys.path has Python36-32\Lib\site-packages. In addition, I have also tried copying the odbc.pyd file next to python.exe in \Python\Python36-32, but none of it has worked.

What am I missing?

Saugat Mukherjee
  • 778
  • 8
  • 32

1 Answers1

0

After googling around, found this :https://www.lfd.uci.edu/~gohlke/pythonlibs/#pywin32

and followed this To install pywin32 system files, run python.exe Scripts/pywin32_postinstall.py -install from an elevated command prompt.

So, did a "run as admin" of cmd and executed python.exe Scripts/pywin32_postinstall.py -install.

Hope someone finds it useful.

Saugat Mukherjee
  • 778
  • 8
  • 32