Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

343
Views
Django Apache server error. no module named 'psycopg2._psycopg' [Dulicate, but duplicate answers didn't work :(]

I am running ubuntu-server 20 and I am trying to run django deplyments server on it with apache2 and libapache2-mod-wsgi-py3. I was having many errors but i somehow managed to fix them but I am stuck on this error:

django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No module named 'psycopg2._psycopg'

psycopg2 and psycopg2-binary are installed in my env. Also I am using python version 3.9.

Here are my apache server configs (if you need them)

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        ServerName darkzone

        Alias /static /home/nika/HackerForum/staticfiles
        <Directory /home/nika/HackerForum/staticfiles>
                Require all granted
        </Directory>


        Alias /media /home/nika/HackerForum/media
        <Directory /home/nika/HackerForum/media>
                Require all granted
        </Directory>

        <Directory /home/nika/HackerForum/HackerForum>
                <Files wsgi.py>
                        Require all granted
                </Files>
        </Directory>

        WSGIScriptAlias / /home/nika/HackerForum/HackerForum/wsgi.py
        WSGIDaemonProcess darkzone python-path=/home/nika/HackerForum python-home=/home/nika/HackerForum/venv
        WSGIProcessGroup darkzone

</VirtualHost>

WSGIPythonHome /home/nika/HackerForum/venv
WSGIPythonPath /home/nika/HackerForum

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!