2015-09-22 68 views
2

使用CentOS 7并试图按照教程,但失败。Django-cms无法创建项目以下教程创建项目失败发生

我使用了virtualenvwrapper。

mkvirtualenv env 

然后我按照教程。

创建项目之前。

(env)[***@*** ~]$ python -V 
Python 3.4.3 
(env)[***@*** ~]$ pip list 
pip {7.1.2) 
setuptools (18.2) 
wheel (0.24.0) 

安装djangocms的安装程序:

(env)[***@*** ~]$ pip install djangocms-installer 
Collecting djangocms-installer 
    Using cached djangocms_installer-0.8.0-py2.py3-none-any.whl 
Collecting six (from djangocms-installer) 
    Using cached six-1.9.0-py2.py3-none-any.whl 
Requirement already satisfied (use --upgrade to upgrade): pip in ./.virtualenvs/env/lib/python3.4/site-packages (from djangocms-installer) 
Collecting tzlocal (from djangocms-installer) 
Collecting argparse (from djangocms-installer) 
    Using cached argparse-1.4.0-py2.py3-none-any.whl 
Collecting dj-database-url (from djangocms-installer) 
    Using cached dj_database_url-0.3.0-py2.py3-none-any.whl 
Collecting pytz (from tzlocal->djangocms-installer) 
    Using cached pytz-2015.6-py2.py3-none-any.whl 
Installing collected packages: six, pytz, tzlocal, argparse, dj-database-url, djangocms-installer 
Successfully installed argparse-1.4.0 dj-database-url-0.3.0 djangocms-installer-0.8.0 pytz-2015.6 six-1.9.0 tzlocal-1.2 

创建项目:

(env)[***@*** ~]$ mkdir tutorial-project 
(env)[***@*** ~]$ cd tutorial-project/ 
(env)[***@*** tutorial-project]$ djangocms -p . mysite 
Database configuration (in URL format) [default sqlite://localhost/project.db]: 
django CMS version (choices: 2.4, 3.0, 3.1, stable, develop) [default stable]: 
Django version (choices: 1.4, 1.5, 1.6, 1.7, 1.8, stable) [default stable]: 
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. Only language codes supported by Django can be used here: en, de 
Optional default time zone [default America/New_York]: 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 
Use custom template set [default no]: 
Load a starting page with examples after installation (english language only). Choose "no" if you use a custom template set. (choices: yes, no) [default no]: yes 
Creating the project 
Please wait while I install dependencies 
Dependencies installed 
Creating the projectFailure occurred. Do you want to cleanup by removing /home/***/tutorial-project? [Y/N] N 

该目录是空的,不管我输入Y或N,但用N谈到以下几点。未能创建项目后

Traceback (most recent call last): 
    File "/home/***/.virtualenvs/env/lib/python3.4/site-packages/djangocms_installer/main.py", line 31, in execute 
    install.check_install(config_data) 
    File "/home/***/.virtualenvs/env/lib/python3.4/site-packages/djangocms_installer/install/__init__.py", line 55, in check_install 
    raise EnvironmentError("\n".join(errors)) 
OSError: Pillow is not compiled with JPEG support, see 'Libraries installation issues' documentation section: http://djangocms-installer.readthedocs.org/en/latest/libraries.html 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "/home/***/.virtualenvs/env/bin/djangocms", line 11, in <module> 
    sys.exit(execute()) 
    File "/home/***/.virtualenvs/env/lib/python3.4/site-packages/djangocms_installer/main.py", line 57, in execute 
    "http://djangocms-installer.rtfd.org\n" % e).with_traceback(tb) 
    File "/home/***/.virtualenvs/env/lib/python3.4/site-packages/djangocms_installer/main.py", line 31, in execute 
    install.check_install(config_data) 
    File "/home/***/.virtualenvs/env/lib/python3.4/site-packages/djangocms_installer/install/__init__.py", line 55, in check_install 
    raise EnvironmentError("\n".join(errors)) 
OSError: Pillow is not compiled with JPEG support, see 'Libraries installation issues' documentation section: http://djangocms-installer.readthedocs.org/en/latest/libraries.html 
Documentation available at http://djangocms-installer.rtfd.org 

PIP列表:

dj-database-url (0.3.0) 
Django (1.7.10) 
django-classy-tags (0.6.2) 
django-cms (3.1.3) 
django-reversion (1.8.5) 
django-sekizai (0.8.2) 
Django-Select2 (4.3.1) 
django-treebeard (3.0) 
djangocms-admin-style (0.2.8) 
djangocms-column (1.5) 
djangocms-file (0.1) 
djangocms-flash (0.2.0) 
djangocms-googlemap (0.3) 
djangocms-inherit (0.1) 
djangocms-installer (0.8.0) 
djangocms-link (1.7.0.dev1) 
djangocms-picture (0.1) 
djangocms-style (1.5) 
djangocms-teaser (0.1) 
djangocms-text-ckeditor (2.6.0) 
djangocms-video (0.1) 
html5lib (0.9999999) 
Pillow (2.9.0) 
pip (7.1.2) 
pytz (2015.6) 
setuptools (18.2) 
six (1.9.0) 
tzlocal (1.2) 
wheel (0.24.0) 

我试图

sudo yum install libjpeg-devel libpng-devel libtiff-devel freetype-devel zlib-devel 

谢谢。

回答

2

This answer,特别是CentOS评论,可能对您有用。

sudo yum install libjpeg-turbo-devel libpng-devel zlib-devel 

此外,基于评论,您可能需要卸载并重新安装Pillow。 看到这个related post on Pillow errors for DjangoCMS

+0

谢谢。我已经安装了上述三个软件包。我也在相关帖子后升级了枕头。还是一样的错误。 – wachiu

+1

哦。我在你的链接中跟着第二个答案,它解决了我的问题。谢谢。 – wachiu