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