4

I am running a django app on Windows server 2008 R2(64 bit). The same app works fine on my other system which has windows 7 64 bit. I am actually trying to move the app to the other machine. I am using Python 2.7 and django 1.4. The manage.py runserver works fine and is able to start the server.

0 errors found
Django version 1.4, using settings 'checkmeout.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[11/Aug/2016 05:22:09] "GET /admin/ HTTP/1.1" 500 115256 

While trying to access the admin page or any other url from http://127.0.0.1/8000,I am getting the following error.

ImportError at /admin/
No module named apps
Request Method: GET
Request URL:    http://127.0.0.1:8000/admin/
Django Version: 1.4
Exception Type: ImportError
Exception Value:    
No module named apps
Exception Location: C:\Python27\lib\site-     packages\django_extensions\admin\__init__.py in <module>, line 10
Python Executable:  C:\Python27\python.exe
Python Version: 2.7.5
Python Path:    
['C:\\HardwareReservation\\checkmeout2',
'C:\\Windows\\system32\\python27.zip',
'C:\\Python27\\DLLs',
'C:\\Python27\\lib',
'C:\\Python27\\lib\\plat-win',
'C:\\Python27\\lib\\lib-tk',
'C:\\Python27',
'C:\\Python27\\lib\\site-packages',
'C:/SoftwareServices/checkmeout']

The output of pip freeze (on the system where it does not work) is put below in case that helps.

amqp==1.4.9
anyjson==0.3.3
billiard==3.3.0.23
celery==3.1.23
Django==1.4
django-apps==0.1.0
django-celery==3.1.17
django-extensions==1.7.1
djangorestframework==3.2.0
kombu==3.0.35
MySQL-python==1.2.4
pytz==2016.6.1
six==1.10.0
South==1.0.2
web.py==0.37

The pip freeze on the system where it works is below :

amqp==1.4.9
anyjson==0.3.3
billiard==3.3.0.23
celery==3.1.23
Django==1.4
django-celery==3.1.17
django-extensions==1.6.7
kombu==3.0.35
MySQL-python==1.2.5
pysphere==0.1.7
python-ldap==2.4.25
pytz==2016.4
six==1.10.0
South==1.0.2
virtualenv==15.0.2

1 Answers1

4

I ran into a similar problem. Try installing the older version of django-extensions that worked:

pip install django-extensions=="1.6.7"
  • Thanks @hodgerpodger , My colleague also suggested the same and it worked. But can you explain how did you come to the conclusion that older version could solve the issue. The error message didnt give a clue. – Sumit Agrahari Aug 20 '16 at 05:02
  • You're welcome @sumit-agrahari . No silver bullet for me. I just happened to have the same exceptions-caused-by-newer-versions problem across a few different packages recently for source I wrote myself years ago, with django-extensions being one of them. – Hodgerpodger Aug 30 '16 at 23:54