Multiple django sites on Apache / Windows / mod_wsgi - problem with win32

前端 未结 5 464
一向
一向 2020-12-19 07:09

I have two django sites that use the same database and share some of the code. The main parent site is an extranet for staff and contractors, while the second site exposes s

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-19 07:46

    I had this same problem (using Python 2.7, Django 1.4.1, Apache 2.2, mod_wsgi 3.3) and solved it by removing pywin32 (ver.217). Django tries to import from pywin32, but doesn't appear to require it. If you need pywin32 in your Django site, this is not the answer for you, but I just had it installed and wasn't using it.

    EDIT: I was actually using virtualenv for my sites, but my main Python was leaking in. If you do need pywin32 in some things, then use virtualenv, and read this wiki page on mod_wsgi and virtual environments:

    VirtualEnvironments - mod_wsgi

提交回复
热议问题