When I change sqlite3 to postgresql, I receave error,
this error I have only then I run apache2,
if I start "manage.py runserver 0.0.0.0:8000" its work fine.
I tried so many things, but I couldn’t find the answer.
psycopg2 is installed.
Part of error:
file "/../...postgresql/base.py", line 25..
import psycopg as Database
ModuleNotFoundError: No module namged 'psycopg'
file "/../...postgresql/base.py", line 27..
import psycopg2 as Database
ModuleNotFoundError: No module namged 'psycopg2'
..
..
Traceback (..):
file /../../wsgi.py
application =get_wsgi_application()
..
..
..
..
mod_wsgi (pid-1111): Target SWGI script '/aa/bb/wsgi.py' does not contain WSGI application 'application'
remove libraries and renew install, restart apache2, correct wsgi.py, 000-default.conf
2
Answers
I solved my problems, when I created new environment in my project, everything is ok. Maybe, I had mistake in old environment when I tried install any libraries.
For the first part you can try installing psycopg2-binary using this command:
for the second part, it seems there is an issue with your wsgi.py file, may you provide more logs?