初めて Windows に Python アプリをデプロイしています (Apache & mod_wsgi/Flask/Sqlalchemy)。
pyodbc を使用して、Sqlalchemy が mssql と通信できるようにしたいと考えています。
pyodbc のバイナリ ビルドを問題なくインストールできました。コマンド ラインから使用すると動作します。ただし、mod_wsgi はヒット時にインポート エラーをログに記録しています。import pyodbc
pyodbc issue tracker のこのスレッドは、私の問題を正確に説明しており、Windows マニフェストに関係しているようです。ただし、mt.exe を使用して解決する方法がわかりません。
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.`
コマンドで:
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.
私は何を間違っていますか?!