3

I just installed a new MiTM software called: Subterfuge on Arch Linux 32-bit but when I try to run it as sudo I get the following error:

Traceback (most recent call last):
  File "/usr/share/subterfuge/manage.py", line 2, in <module>
    from django.core.management import execute_manager
ImportError: No module named django.core.management

I am posting here because I believe that this is a general error related to Python paths, however I don't know how to work around it.

Any ideas?

Santosh Kumar
  • 26,475
  • 20
  • 67
  • 118
stratis
  • 7,750
  • 13
  • 53
  • 94

4 Answers4

1

It looks like the module 'django.core.management' is not installed... Have add it in the INSTALLED_APP in settings.py?

Guillaume le Floch
  • 1,083
  • 2
  • 11
  • 23
  • I don't think so...how do I do that? – stratis Aug 18 '12 at 19:34
  • `django.core` packages don't have to be added to `INSTALLED_APPS`. Looks more like django isn't in PYTHONPATH (or not installed at all). To verify try `import django` from the Python interactive shell. – Dirk Eschler Aug 18 '12 at 19:53
1

Allright. Problem solved.

User 'Steve K' provided the solution in this thread: django import error - No module named core.management

I 'vimed' the very first line of this file: /usr/share/subterfuge/manage.py

and changed the following line: #!/usr/bin/env python

to

#!/usr/bin/env python2

Apparently python pointed to python 3 on my system and that's why the file couldn't be processed.

Community
  • 1
  • 1
stratis
  • 7,750
  • 13
  • 53
  • 94
  • 1
    Arch Linux uses Python 3 as standard already. They fix all the magic lines of Python software with sed in their packages. – eminor Aug 18 '12 at 22:11
0

Are you sure that django is already installed ?

Django is still experimental on python 3

try a: python -c 'import django'

Experimental Python 3 support

by Aymeric Augustin on Aug. 19, 2012

The Django project reached a significant milestone today: for the first time, the development version of Django passes the test suite under Python 3.2, with the SQLite and PostgreSQL backends.

The community is encouraged to test this pre-alpha version and report bugs under Python 3 as well as regressions under Python 2.

VGE
  • 4,171
  • 18
  • 17
0

Install python-pip first.

apt-get install python-pip

Then run the subterfuge setup.py

python setup.py

It will install Django along with it. But you can install Django manually by

pip install django=="1.7"

Note: Currently it supports django 1.7

Sp4Rx
  • 1,498
  • 3
  • 20
  • 37