vanz
vanz

Reputation: 1003

First time install Django on Mac OSX Mountain Lion

First time ever I'm installing Django (and using python). I run Mac OSX 10.8 Mountain Lion and by default, python is already installed:

$ python
Python 2.7.2 (default, Jun 20 2012, 16:23:33) 
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

I've followed the steps at https://docs.djangoproject.com/en/1.4/intro/install/ namely:

Download Django at https://www.djangoproject.com/download/ and run the following:

$ tar xzvf Django-1.4.1.tar.gz
$ cd Django-1.4.1
$ sudo python setup.py install

This has created a symlink in /user/local/bin which allows me to invoke Django from anywhere with $ django-admin.py

However, trying the following fails:

$ python
Python 2.7.2 (default, Jun 20 2012, 16:23:33) 
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> 

I should be getting something after typing >>> import django

>>> print django.get_version()
1.4

Is it me missing something or the documentation not so accurate?

Upvotes: 0

Views: 7879

Answers (1)

Garrett Hyde
Garrett Hyde

Reputation: 5597

Actually, the fact that import django doesn't print anything means that Django was installed correctly.

import django only imports the Django module; it doesn't start a webserver or anything.

Upvotes: 3

Related Questions