Correct mt.exe syntax to resolve pyodbc import problems

时光怂恿深爱的人放手 提交于 2019-12-06 01:59:00
Alfred Rossi

I'm the author of the thread on the pyodbc issue tracker.

Unless I'm missing something it looks like the file "C:\Windows\SysWOW64\python27.dll" doesn't exist. Maybe you have a version other than 2.7?

Otherwise, make sure you have installed the official windows packages for python and verify that importing pyodbc succeeds with that version. If it does, you should be able to substitute the path to your local python.dll (e.g. python27.dll) from the python installation root or elsewhere.

Well, this is embarrassing: I appear to be missing some semicolons. I know that I'd run the command properly at least a few times though, so I will list the other things I changed before noticing the mistake in the syntax:

  • Made triply sure everything was 32-bit
  • Downloaded Visual Studio C++ 2008 Express (was just running VC++ 2008 redistributable before, and this gave me a different version of mt.exe)
  • Uninstalled anything with "2010" and "C++" in its name
  • Ran the command in cmd; for whatever reason, it does not work at all in PowerShell.

Thanks again to Alfred for his epically detailed and helpful post over at the pyodbc mailing list.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!