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?

4 Answers 4

1
+500

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

Sign up to request clarification or add additional context in comments.

2 Comments

I don't think so...how do I do that?
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.
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.

1 Comment

Arch Linux uses Python 3 as standard already. They fix all the magic lines of Python software with sed in their packages.
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.

Comments

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.