在Leopard上通过Macports安装Django
我在Leopard系统上通过mac ports安装了Python 2.6和3.1,没遇到什么问题。我想为Python 2.6通过mac ports安装Django 1.2,但在网上搜索怎么做时,发现的信息似乎都不太对。有没有人能给我指个明路?谢谢!
3 个回答
0
只需要把django的压缩包放到site-packages文件夹里(在py2.6及以上版本是dist-packages),就完成了。你为什么还需要macports这些工具呢?用纯Python的库就可以了。
1
这个包有什么问题呢?
$ port info py26-django
py26-django @1.2.1 (python, www)
Variants: bash_completion, universal
Description: Django is a high-level Python Web framework that
encourages rapid development and clean, pragmatic design.
Homepage: http://www.djangoproject.com
Library Dependencies: python26, py26-distribute
Platforms: darwin
License: unknown
Maintainers: arthurk@macports.org
1
或者更好的是,使用easy_install:
easy_install django
甚至更好的是,使用pip(再加上virtualenv,作为额外的好处(还有virtualenvwrapper,让你玩得更开心!)):
pip install django