gpt4 book ai didi

macos - Pillow 编译时不支持 JPEG - 安装 Django Cms

转载 作者:行者123 更新时间:2023-12-01 16:48:58 24 4
gpt4 key购买 nike

我正在尝试让 Django Cms 在我的系统上运行。遵循 Django-CMS 教程:https://github.com/divio/django-cms-tutorial

我必须安装枕头,但现在当我运行时:

$ djangocms -p . my_demo

并填写所有选项,我收到以下错误:

HTTP error 404 while getting https://github.com/divio/django-cms/archive/3.0c2.zip
Exception:
Traceback (most recent call last):
File "/Users/macbook/Desktop/MyProjects/djangoCMS/demo/demoEnv/lib/python2.7/site- packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/Users/macbook/Desktop/MyProjects/djangoCMS/demo/demoEnv/lib/python2.7/site- packages/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/Users/macbook/Desktop/MyProjects/djangoCMS/demo/demoEnv/lib/python2.7/site-packages/pip/req.py", line 1197, in prepare_files
do_download,
File "/Users/macbook/Desktop/MyProjects/djangoCMS/demo/demoEnv/lib/python2.7/site-packages/pip/req.py", line 1375, in unpack_url
self.session,
File "/Users/macbook/Desktop/MyProjects/djangoCMS/demo/demoEnv/lib/python2.7/site-packages/pip/download.py", line 547, in unpack_http_url
resp.raise_for_status()
File "/Users/macbook/Desktop/MyProjects/djangoCMS/demo/demoEnv/lib/python2.7/site-packages/pip/_vendor/requests/models.py", line 773, in raise_for_status
raise HTTPError(http_error_msg, response=self)
HTTPError: 404 Client Error: Not Found

Storing debug log for failure in /Users/macbook/.pip/pip.log
Traceback (most recent call last):
File "/Users/macbook/Desktop/MyProjects/djangoCMS/demo/demoEnv/bin/djangocms", line 11, in <module>
sys.exit(execute())
File "/Users/macbook/Desktop/MyProjects/djangoCMS/demo/demoEnv/lib/python2.7/site-packages/djangocms_installer/main.py", line 24, in execute
install.check_install(config_data)
File "/Users/macbook/Desktop/MyProjects/djangoCMS/demo/demoEnv/lib/python2.7/site-packages/djangocms_installer/install/__init__.py", line 54, in check_install
raise EnvironmentError("\n".join(errors))
EnvironmentError: Pillow is not compiled with JPEG support, see 'Libraries installation issues' documentation section.

在网上搜索时,我发现我必须安装libjpeg

即使这样做之后我也遇到了同样的错误。现在我无法让它工作,我真的很想使用 Django CMS。很确定我在安装 libjpeg 时做错了什么。但我现在很确定如何开始!

最佳答案

也有类似的问题。以下是我如何摆脱它的方法。

  1. 安装 Pillow 以及所有必要的依赖项。可以引用这个link如果您在 mac 上运行,只需输入以下命令$brew安装libtifflibjpegwebplittle-cms2$ pip install Pillow

  2. 如果你仔细观察,你会发现当程序尝试访问 github.com/divio/django-cms/archive/3.0c2.zip 时出现错误您需要删除“c2”才能保留 github.com/divio/django-cms/archive/3.0.zip

要编辑它,请转到/env/lib/python2.7/site-packages/djangocms_installer/config其中 env 是您正在使用的环境(如果您使用的是 virtualenv。只需找到您的 site-packages 目录)

打开 data.py 并按上述方式更改第 7 行。您可能需要更改文件的权限才能对其进行编辑。

从现在开始,它应该运行良好。

希望有帮助。

关于macos - Pillow 编译时不支持 JPEG - 安装 Django Cms,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23374539/

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