Nugroho's blog.: Django Python Module on OS X Lion 10.7.2

Sunday, December 11, 2011

Django Python Module on OS X Lion 10.7.2

As python programmer, I wish I could build a web using it too. I used to use CMS based portal, but eventually I want python thing in my site. Fortunately, it can be done, using Django.

According it site, Django (https://www.djangoproject.com/) is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

Developed by a fast-moving online-news operation, Django was designed to handle two challenges: the intensive deadlines of a newsroom and the stringent requirements of the experienced Web developers who wrote it. It lets you build high-performing, elegant Web applications quickly.

So I finally give it a try, it isn't hurt anyway, :). Installing Django in my Python 2.7 on my 13' Macbook Pro with OS X Lion 10.7.2 is fairly easy, using pip from pypi (pypi.python.org/). All I have to do is typing in terminal: pip install django. Of course, we need pip to be installed first.

Nugrohos-MacBook-Pro:python nugroho$ pip django
Usage: pip COMMAND [OPTIONS]


pip: error: No command by the name pip django
(maybe you meant "pip install django")
Nugrohos-MacBook-Pro:python nugroho$ pip install django
Downloading/unpacking django
Downloading Django-1.3.1.tar.gz (6.5Mb): 6.5Mb downloaded
Running setup.py egg_info for package django

Installing collected packages: django
Running setup.py install for django
changing mode of build/scripts-2.7/django-admin.py from 644 to 755

changing mode of /Library/Frameworks/Python.framework/Versions/2.7/bin/django-admin.py to 755
Successfully installed django
Cleaning up...
Nugrohos-MacBook-Pro:python nugroho$python
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> print django.get_version()
1.3.1
>>> exit()
Nugrohos-MacBook-Pro:python nugroho$

That's it.


No comments:

323f (5) amp (1) android (12) apple (7) arduino (18) art (1) assembler (21) astina (4) ATTiny (23) blackberry (4) camera (3) canon (2) cerita (2) computer (106) crazyness (11) debian (1) delphi (39) diary (286) flash (8) fortran (6) freebsd (6) google apps script (8) guitar (2) HTML5 (10) IFTTT (7) Instagram (7) internet (12) iOS (5) iPad (6) iPhone (5) java (1) javascript (1) keynote (2) LaTeX (6) lazarus (1) linux (29) lion (15) mac (28) macbook air (8) macbook pro (3) macOS (1) Math (3) mathematica (1) maverick (6) mazda (4) microcontroler (35) mountain lion (2) music (37) netbook (1) nugnux (6) os x (36) php (1) Physicist (29) Picture (3) programming (189) Python (109) S2 (13) software (7) Soliloquy (125) Ubuntu (5) unix (4) Video (8) wayang (3) yosemite (3)