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

前端 未结 4 1715
滥情空心
滥情空心 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:32

    Try these commands Debian, Ubuntu

    sudo apt-get install python-dev
    sudo apt-get install libpq-dev
    

    For RedHat Enterprise, Fedora, CentOS

    sudo yum install python-devel
    sudo yum install postgresql-libs
    

    Then Install psycopg2

    pip install psycopg2
    

提交回复
热议问题