Fix mt.exe syntax to resolve pyodbc import issues

This is my first time deploying a Python application on Windows (Apache and mod_wsgi / Flask / Sqlalchemy).

I would like to use pyodbc to get Sqlalchemy to speak with mssql.

I managed to install the pyobbc binary assembly without any problems, and it works when I use it from the command line. However, mod_wsgi logs import errors when it reachesimport pyodbc

This thread in the pyobbc search log describes my problem accurately and seems to imply Windows manifestations. However, I cannot figure out how to use mt.exe to solve it.

In PowerShell:

C:\my\site-packages> C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\mt.exe 
-inputresource:c:\Windows\SysWOW64\python27.dll;#2 -manifest 
-outputresource:pyodbc.pyd#2'

mt.exe : command line error c10100a9: Some operation on the input manifests must
be specified (even if it is just to pipe the input to the output).
Use the /? option for help on usage and samples.`

In cmd:

C:\my\site-packages>"C:\Program Files\Microsoft SDKs"\Windows\v7.1\Bin\mt.exe 
-inputresource:C:\Windows\SysWOW64\python27.dll#2 -outputresource:pyodbc.pyd#2

mt.exe : general error c101008c: Failed to read the manifest from the resource 
of file "C:\Windows\SysWOW64\python27.dll#2". The system cannot find the file 
specified.

What am I doing wrong?!

+3
source share
2 answers

- pyobbc.

- , , " C:\Windows\SysWOW64\python27.dll" . , , 2.7?

, Windows python , pyopbc . , python.dll(, python27.dll) python .

+2

, : , . , , , , , :

  • , 32-.
  • Visual Studio ++ 2008 Express ( V++ 2008, mt.exe)
  • - "2010" "++"
  • cmd; - , PowerShell.

pyodbc.

0

All Articles