I finished installing devstack on CentOS 7 and gave this error in the log: ... / wsgi.py' cannot be loaded as Python module.

asked 2020-01-20 05:14:23 -0600

wenderfirmino gravatar image

updated 2020-01-20 05:16:07 -0600

I installed devstack according to the documentation and when finished I was missing a django module as I understand it. I have already disabled SElinux, Firewalld and NetworkManager, I would like help to solve this problem, I have researched a lot and I have not found the solution.

Here is the full log:

    2020-01-20 10:55:42.036719 mod_wsgi (pid=25003): Target WSGI script '/opt/stack/horizon/openstack_dashboard/wsgi.py' cannot be loaded as Python module.
2020-01-20 10:55:42.036828 mod_wsgi (pid=25003): Exception occurred processing WSGI script '/opt/stack/horizon/openstack_dashboard/wsgi.py'.
2020-01-20 10:55:42.036953 Traceback (most recent call last):
2020-01-20 10:55:42.037045   File "/opt/stack/horizon/openstack_dashboard/wsgi.py", line 21, in <module>
2020-01-20 10:55:42.037299     from django.core.wsgi import get_wsgi_application
2020-01-20 10:55:42.037367 ImportError: No module named django.core.wsgi
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2020-01-20 06:28:01 -0600

checkPoint 1. wsgi python version mismatch ( check ur python version 2 or 3 change wsgi accordingly ) 2. check wsgi.py is executable permission.

edit flag offensive delete link more


hi this is how apache, python and wsgi are configured according to the log:

Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_wsgi/3.4 Python/2.7.5 configured -- resuming normal operations

I gave execution permission to all users in the wsgi.py file.

wenderfirmino gravatar imagewenderfirmino ( 2020-01-20 06:38:19 -0600 )edit

on your system run python import sys import django what is output ?

piyushsrivastava gravatar imagepiyushsrivastava ( 2020-01-20 08:40:31 -0600 )edit

either django module is missing in your system, if missed installed separately. check for permission, keep taping logs

piyushsrivastava gravatar imagepiyushsrivastava ( 2020-01-20 08:46:37 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2020-01-20 05:14:23 -0600

Seen: 439 times

Last updated: Jan 20 '20