Django 1.7.1 installation fails with default settings on Centos7 64bit
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/asdgdfg/public_html/lib/python/Django-1.7.1-py2.7.egg/django/core/management/init.py", line 385, in execute_from_command_line
utility.execute()
File "/home/asdgdfg/public_html/lib/python/Django-1.7.1-py2.7.egg/django/core/management/init.py", line 354, in execute
django.setup()
File "/home/asdgdfg/public_html/lib/python/Django-1.7.1-py2.7.egg/django/init.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/asdgdfg/public_html/lib/python/Django-1.7.1-py2.7.egg/django/apps/registry.py", line 89, in populate
"duplicates: %s" % app_config.label)
django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: admin</module>
also in the script /usr/libexec/webmin/virtual-server/scripts/django.pl in python version check it states that Django => 1.5 requires Python 2.6.5 but now Django 1.7.1 requires already Python 2.7 as minimal requirement:
https://docs.djangoproject.com/en/1.7/intro/install/
basically what I found in generated settings.py file is dublicate django.contrib.admin:
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
)
Last edit: Juris Malinens 2014-12-04
if I comment out
installations finishes but I get 500 error:
(104)Connection reset by peer: [client 192.168.0.100:62715] mod_fcgid: error reading data from FastCGI server
[Thu Dec 04 05:29:50.751867 2014] [core:error] [pid 6394] [client 192.168.0.100:62715] End of script output before headers: django.fcgi
When I run Django with built-in webserver:
-sh-4.2$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 8, in <module>
from django.core.management import execute_from_command_line
ImportError: No module named django.core.management</module>
That happens because
/home/testdjango/public_html/lib/python/
is not in PYTHONPATH
and:
export PYTHONPATH=$PYTHONPATH:/home/testdjango/public_html/lib/python
helps.
BUT!
when I run now Django, I get:
django.db.utils.OperationalError: FATAL: Peer authentication failed for user "testdjango"
and this is PostgreSQL config issue which can be fixed
Do you see these same problems when using MySQL instead of PostgreSQL?
The last error is postgres issue and not much to do with installation. But those previous errors should be fixed...
and installer should move away from fcgid implementation as it is now deprecated (as of version 1.7) and will be removed:
https://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/
Last edit: Juris Malinens 2014-12-05
Yes, I'll fix up those settings.py and version comparison issues.
Regarding the 500 error - did you install Django into a sub-directory, or at the top level in the target domain?
top-level