Django, mod_wsgi, psycopg2 ImproperlyConfigured: Error loading psycopg2 module: No module named _psycopg

前端 未结 4 1710
滥情空心
滥情空心 2020-12-17 21:49

I have a Django 1.5, Python 2.7 site running under Apache with mod_wsgi on a CentOS 6.4 server.

I have rebuilt this site using Django 1.6 and Python 3.3. Deploying

4条回答
  •  既然无缘
    2020-12-17 22:25

    The problem was that mod_wsgi was compiled for Python 2.7 and it needed to be recompiled for Python 3.3. I did not find a new mod_wsgi available anywhere as a package so I recompiled it.

    Since Python 3 is an alternate install on CentOS 6.4 .configure had a difficult time producing a good Makefile, even passing the --with-python option. I needed to edit Makefile a bit after getting the information from python3.3-config --cflags and also with --ldflags options.

    HTH someone in the future.

提交回复
热议问题