Getting error while running django-cms demo page

I tried all of the procedure for installing django-cms, after that when i try to run a demo page i getting the below error.

(djvenv2)shan@shan:~/workspace/projects/djvenv$ pip freeze

(djvenv2)shan@shan:~/workspace/projects/djvenv$ djangocms -p . my_demo
Database configuration (in URL format) [default sqlite://localhost/project.db]:
django CMS version (choices: 2.4, 3.0, stable, develop) [default stable]:
Django version (choices: 1.4, 1.5, 1.6, stable) [default 1.5]:
Activate Django I18N / L10N setting (choices: yes, no) [default yes]:
Install and configure reversion support (choices: yes, no) [default yes]:
Languages to enable. Option can be provided multiple times, or as a comma separated list: en
Optional default time zone [default America/Chicago]:
Activate Django timezone support (choices: yes, no) [default yes]:
Activate CMS permission management (choices: yes, no) [default yes]:
Use Twitter Bootstrap Theme (choices: yes, no) [default no]: yes
Load a starting page with examples after installation (choices: yes, no) [default no]: yes
INFO: Starting new HTTPS connection (1):
Traceback (most recent call last):
  File "/home/shan/workspace/venv/djvenv2/bin/djangocms", line 9, in <module>
    load_entry_point('djangocms-installer==0.4.1', 'console_scripts', 'djangocms')()
  File "/home/shan/workspace/venv/djvenv2/local/lib/python2.7/site-packages/djangocms_installer/", line 24, in execute
  File "/home/shan/workspace/venv/djvenv2/local/lib/python2.7/site-packages/djangocms_installer/install/", line 52, in check_install
    raise EnvironmentError("\n".join(errors))
EnvironmentError: Pillow is not compiled with JPEG support, see 'Libraries installation issues' documentation section.


Add JPEG support to Pillow, in Ubuntu you can do the following:

sudo apt-get install libjpeg-dev libfreetype6-dev zlib1g-dev

# Link the libraries for Pillow to find them:

sudo ln -s /usr/lib/`uname -i`-linux-gnu/ /usr/lib/
sudo ln -s /usr/lib/`uname -i`-linux-gnu/ /usr/lib/
sudo ln -s /usr/lib/`uname -i`-linux-gnu/ /usr/lib/

# reinstall Pillow (In case you have Pillow already installed)
pip install --upgrade --force-reinstall pillow

Install the required libs:

Then uninstall and reinstall Pillow in your virtualenv

pip uninstall Pillow
pip install --no-cache-dir Pillow

I actually found the chosen solution here to be great help. I also found that the djangcms installer wants a specific version of Pillow, which results in it not picking up the JPEG module for whatever reason. At the time of this writing, it wanted Pillow==2.8.0 but the latest version that pip --upgrade was installing was 2.9.x. I ran pip install --no-cache-dir --upgrade --force-reinstall pillow==2.8.0 and that seemed to satisfy the djangocms installer's requirement such that it would retain JPEG compatibility.

You can verify that JPEG support is installed by opening a python shell in the virtualenv.

from PIL import Image

i ='/path/to/a.jpg')

You'll either get a handle to the loaded image or an exception if there's no JPEG support.

So pip was succesfully installing a Pillow package with JPEG support, but as soon as I ran the djangocms installer, it was replacing it with a Pillow package without JPEG support. You need to match the version of Pillow that djangocms installer wants. I don't know where that config is, but you can figure it out with pip freeze or pip list after a failed install.

Hopefully this helps someone.

I faced the same issue under my BitNami LAMP Virtual Machine and can not solved it from linking the missing files for Pillow. Finally, I solved it:

first, find the lib

(venv)...$ find 2>/dev/null / -name

now add the lib directory into pip

(venv)...$ pip install --global-option=build_ext --global-option="-L/opt/bitnami/common/lib" --global-option="-I/opt/bitnami/common/include" --upgrade --force-reinstall pillow

it works:

version      Pillow 2.7.0
platform     linux2 2.7.6 (default, Mar 22 2014, 22:59:56)
             [GCC 4.8.2]
*** TKINTER support not available
--- JPEG support available
*** OPENJPEG (JPEG2000) support not available
--- ZLIB (PNG/ZIP) support available
--- LIBTIFF support available
--- FREETYPE2 support available
*** LITTLECMS2 support not available
*** WEBP support not available
*** WEBPMUX support not available

also see python pip specify a library directory and an include directory

Need Your Help

How do I import material design library to Android Studio?

android gradle android-studio material-design

I want to import this library to my project in Android Studio v1.0.0 rc2: