开发者

django-mssql not working in Apache w/ mod-wsgi, but works fine in dev server

开发者 https://www.devze.com 2023-03-07 15:45 出处:网络
I have a Django application using django-mssql to communicate w/ SQL Server. This works just fine in the dev server (runserver) but under Apache/mod-wsgi, I get a fail related to it trying to find a

I have a Django application using django-mssql to communicate w/ SQL Server.

This works just fine in the dev server (runserver) but under Apache/mod-wsgi, I get a fail related to it trying to find a .dll which does exist:

[Thu May 19 15:35:09 2011] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\win32\\lib\\pywintypes.py", line 98, in
__import_pywin32_system_module__ [Thu May 19 15:35:09 2011] [error] [client
127.0.0.1]     raise ImportError("No system module '%s' (%s)" % (modname, filename)) [Thu May 19 15:35:09 2011] [error] [client 127.0.0.1] ImportError: No system module 'pywintypes' (pywintypes27.dll)

pywintypes27.dll exists in C:\Windows\SysWOW64 (64 bit windows, but I installed 32 bit py and Apache)

Is there something in either httpd.conf or WSGIScriptAlias I need to do/specify to help it find this dll? Something else I should d开发者_运维问答o? I've done a fair bit of Googling/Binging/Searching to no avail.

Some further info: python27 (not Active State) pywin32 is installed Win Server 2008 (64 bit) Apache 2.2 Django 1.3

Thanks


You mentioned that you have Apache 32bits and the official mod_wsgi site seems to only have win32 mod_wsgi binaries available, which in turn also require a 32 bits version of Python. From your description it is likely that you are using the pywin32 library for Windows 64 bits and you configuration expects the 32 bits one.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号