gpt4 book ai didi

django - 运行 django-cms 演示页面时出现错误

转载 作者:行者123 更新时间:2023-12-02 08:38:38 25 4
gpt4 key购买 nike

我尝试了安装 django-cms 的所有过程,之后当我尝试运行演示页面时,出现以下错误。

(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("\n".join(errors))
EnvironmentError: Pillow is not compiled with JPEG support, see 'Libraries installation issues' documentation section.

最佳答案

为 Pillow 添加 JPEG 支持,在 Ubuntu 中您可以执行以下操作:

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

关于django - 运行 django-cms 演示页面时出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23078303/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com