0

Sorry I realize this is a very novice question: I am not yet skilled in Python. I have tried to follow a few basic django tutorials to get a simple site running. I am getting the error -bash: django-admin.py: command not found in Mac Terminal when trying to use the command django-admin.py startproject FirstBlog function.

If I try python django-admin.py startproject FirstBlog instead, terminal returns

 Traceback (most recent call last):
 File "django-admin.py", line 2, in <module>
 from django.core import management
 ImportError: No module named django.core

I have tried these commands from different directories, but still the same result. This is MacOSX 10.5.8 and Bitnami DjangoStack 1.4. I have tried to find the answer elsewhere on stackoverflow and google: people have suggested changing the path to django-admin.py. I have tried but either have written my paths incorrectly or this isn't the problem.

If more information is required I will gladly supply it. Thank you.

EDIT

I have abandoned the BitNami DjangoStack after a lot of difficulty installing the program. I have reverted to installing Django/mysql manually, which turns out to be a lot easier. Thank you.

Community
  • 1
  • 1
Nick B
  • 9,267
  • 17
  • 64
  • 105

1 Answers1

1

It looks like Bitnami supplies its own version of Python and that's where Django is installed so you need to make sure you are running that Python and not an Apple-supplied system Python, for example. According to the quick start guide, it looks you can either use their supplied console application which should ensure you are running with their Python:

/Applications/djangostack-1.4-0/use_djangostack

or you may be able to use the absolute path to that Python:

/Applications/djangostack-1.4-0/python/bin/python django-admin.py
Ned Deily
  • 83,389
  • 16
  • 128
  • 151
  • I get this message after entering `/Applications/djangostack-1.4-0/python/bin/python django-admin.py` in Terminal: `admins-macbook:~ Admin$ /Applications/djangostack-1.4-0/python/bin/python /Applications/djangostack-1.4-0/python/bin/python: line 3: /Applications/django/scripts/setenv.sh: No such file or directory`. Thanks for your help. – Nick B Apr 08 '12 at 06:45
  • Thank you Ned, but after a lot of problems with this BitNami application I have just installed django/mysql manually. Thank you – Nick B Apr 08 '12 at 16:02
  • I'm sorry you found this problem (I'm from the BitNami team). I tried to reproduce the issue in case it was a bug in our installation however I couldn't reproduce the issue. Indications from Ned worked for me. – kaysa Apr 10 '12 at 11:09