Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
998 views
in Technique[技术] by (71.8m points)

ubuntu 12.04 - 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
Django==1.6.2
PIL==1.1.7
Pillow==2.4.0
South==0.8.4
argparse==1.2.1
dj-database-url==0.3.0
django-classy-tags==0.5.1
django-cms==3.0
django-mptt==0.6.0
django-sekizai==0.7
djangocms-admin-style==0.2.2
djangocms-installer==0.4.1
html5lib==0.999
six==1.6.1
wsgiref==0.1.2

(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): pypi.python.org
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/main.py", line 24, in execute
    install.check_install(config_data)
  File "/home/shan/workspace/venv/djvenv2/local/lib/python2.7/site-packages/djangocms_installer/install/__init__.py", line 52, in check_install
    raise EnvironmentError("
".join(errors))
EnvironmentError: Pillow is not compiled with JPEG support, see 'Libraries installation issues' documentation section.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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/libfreetype.so /usr/lib/
sudo ln -s /usr/lib/`uname -i`-linux-gnu/libjpeg.so /usr/lib/
sudo ln -s /usr/lib/`uname -i`-linux-gnu/libz.so /usr/lib/

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...