ubuntu 14 下安装Django-cms 3.0,这两个都是最近两天更新的,因此,安装比较折腾,记录下。 html
仍是一样想装个虚拟环境, python
到官网下载tar包,https://www.django-cms.org/en/或者用django-cms的安装工具,djangocms-installer.不清楚的参看http://djangocms-installer.readthedocs.org/en/latest/readme.html git
pip install djangocms-installer github
会发现缺乏一大堆依赖包,最麻烦的是pillow,以前你们都知道大名鼎鼎的PIL,可是后面不维护了,如今图片都用的pillow包。可是依赖比较多,虽然是ubuntu14,我仍是去下的12的依赖包 web
树莓派一样用这个也能够 sql
sudo apt-get install python-dev
$ sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev \ libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk libjpeg-dev
所有好了后,pip install pillow shell
djangocms -p /path/whatever project_name
上面分别是安装位置及项目名称 django
language code:en,zh-cn ubuntu
time zone:Asia/Shanghai app
附上官方how to :
Create an empty virtualenv:
virtualenv /virtualenv/path/my_project
Installdjangocms-installer:
pip install djangocms-installer
or:
pip install https://github.com/nephila/djangocms-installer/archive/master.zip
Execute the wizard:
djangocms-start -p /path/whatever project_name
Answer the wizard questions;
Change to your project directory:
cd /path/whatever project_name
Modify the provided settings. You will want to modify at least the language and the template settings;
Execute the project:
(whatever) $ python manage.py runserver
Enjoy!
1.sudo apt-get install libpq-dev
2.pip install psycopg2