Windows 용 Python 응용 프로그램 (Apache & mod_wsgi/Flask/Sqlalchemy)을 처음으로 배포하고 있습니다.pyodbc 가져 오기 문제를 해결하기 위해 mt.exe 구문을 수정하십시오.
pyodbc를 사용하여 Sqlalchemy가 mssql과 대화하고 싶습니다.
pyodbc의 이진 빌드를 문제없이 설치할 수 있었으며 명령 줄에서 사용할 때 작동합니다. 그러나 mod_wsgi가 import pyodbc
This thread on the 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.`
에 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.
!
답장을 보내 주셔서 감사합니다. 'C : \ Windows \ SysWOW64 \ python27.dll'이 존재합니다. 아무 문제없이 탐색 할 수 있습니다. 내가 먹는 것이 무엇이든 상관없이 - 입력 소스는 찾지 못한다고 주장합니다. 나는 DLL, exe (스레드의 추측에 기반)와 exe를 내 virtualenv에 시도했다. 2.7이 버전이 설치되어 있으며 공용 설치 프로그램 (32 비트)을 사용했으며 쉘에서 pyodbc를 가져올 때 제대로 작동합니다. 여기에 무엇이 누락 될 수 있습니까? –
오. 좀 더 자세히 살펴보면 구문 오류가 있습니다 ... 아, 당신도 알아 차렸습니다. –