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