1.下载安装程序
打开终端输入以下命令
$ wget http://www.djangoproject.com/m/releases/1.5/Django-1.5.4.tar.gz
2.把刚下载的包解压缩
$ tar zxvf Django-1.5.4.tar.gz
3.打开解压文件,安装
$ cd Django-1.5.4
$ python setup.py install
4. 测试一下安装的django的
$ python
这样就进入了python环境
$ import django
$ django.VERSION
详细的操作过程如下:
angela@angeladeMacBook-Air:/workspace$python
Python 2.7.5 (default, Aug 25 2013, 00:04:04)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> django.VERSION
(1, 5, 4, 'final', 0)