Thursday, January 16, 2014

ImproperlyConfigured: Error loading psycopg2 module: No module named _psycopg

This question is also on Stackoverflow http://goo.gl/LinMue  but I thought somene here may have an idea.


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 it to the same server and changing the paths in httpd.conf I get the subject error. This new install works as expected using ./manage.py runserver.

Here are the two WSGI definitions from httpd.conf:

  WSGIScriptAlias / /home/ccdgen/CCDGEN2/apache/wsgi.py  WSGIPythonPath         /home/ccdgen/CCDGEN2/ccdgen/ccdgen:/home/ccdgen/CCDGEN2/ccdgen:/home/ccdgen/CCDGEN2/lib/python3.3/site-packages  <Directory /home/ccdgen/CCDGEN2/ccdgen>     <Files wsgi.py>       Order allow,deny       Allow from all     </Files>  </Directory>    #WSGIScriptAlias /ccdgen /home/ccdgen/CCDGEN/apache/wsgi.py  #WSGIPythonPath /home/ccdgen/CCDGEN/mlhim/ccdgen:/home/ccdgen/CCDGEN/mlhim:/home/ccdgen/CCDGEN/lib/python2.7/site-packages  #<Directory /home/ccdgen/CCDGEN/mlhim>  #   <Files wsgi.py>  #     Order allow,deny  #     Allow from all  #   </Files>  #</Directory>

The wsgi.py file is the same on both installations:

  import os  os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mlhim.settings")  from django.core.wsgi import get_wsgi_application  application = get_wsgi_application()

----------------------------------------------------------------------------------------------

Thanks in advance for any ideas.

Cheers,
Tim


--
MLHIM VIP Signup: http://goo.gl/22B0U
============================================
Timothy Cook, MSc           +55 21 94711995
MLHIM http://www.mlhim.org
Like Us on FB: https://www.facebook.com/mlhim2
Circle us on G+: http://goo.gl/44EV5
Google Scholar: http://goo.gl/MMZ1o
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3XNi7-FGOCPnKS%2Bb6%3D-ueWbPMOWFXfOce663fn0YpjWwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate