【執行個體簡介】
一、安裝依賴
CentOS
第一步:
yum install python-devel
第二步:
yum install freetype-devel libjpeg-devel libpng-devel
sudo yum install libtiff-devel libjpeg-devel libzip-devel freetype-devel \
lcms2-devel libwebp-devel tcl-devel tk-devel
第三步:RPM包安裝PIL
下載下傳安裝:ftp://rpmfind.net/linux/atrpms/f20-x86_64/atrpms/stable/PIL-1.1.7-10.1.fc20.x86_64.rpm
更多版本:http://rpmfind.net/linux/rpm2html/search.php?query=PIL&submit=Search ...&system=&arch=
Windows
第一步:
下載下傳安裝pip
a. 下載下傳位址:https://pypi.python.org/packages/source/p/pip/pip-7.1.2.tar.gz#md5=3823d2343d9f3aaab21cf9c917710196
b. 解壓,進入目錄
c. 安裝,Python setup.py install
注:安裝過程中可能依賴setuptools,安裝過程如下:
下載下傳檔案:https://bootstrap.pypa.io/ez_setup.py
執行檔案:Python ez_setup.py
第二步:
pip install Pillow
更多安裝文檔:http://pillow.readthedocs.org/en/latest/installation.html
二 運作
運作:Python manage.py runserver 127.0.0.1:8000
浏覽器通路:http://127.0.0.1:8000/login/
【執行個體截圖】
【核心代碼】