gpt4 book ai didi

windows - 如何在 Windows 上安装 Pillow 依赖项(没有二进制文件)?

转载 作者:可可西里 更新时间:2023-11-01 11:46:22 28 4
gpt4 key购买 nike

我正在尝试在 Windows 10 上使用 Python3 在 vi​​rtualenv 中运行 django-cms。

如果我按照他们网站上的安装步骤并运行命令 djangocms mysite 然后我得到这个错误:

Creating the project
Please wait while I install dependencies
Dependencies installed
Creating the project

*****************************************************************

Check documentation at https://djangocms-installer.readthedocs.io

*****************************************************************

Traceback (most recent call last):
File "c:\users\guter\appdata\local\programs\python\python36-32\lib\runpy.py",
line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\guter\appdata\local\programs\python\python36-32\lib\runpy.py",
line 85, in _run_code
exec(code, run_globals)
File "C:\Users\guter\AppData\Local\Programs\Python\Python36-
32\Scripts\djangocms.exe\__main__.py", line 9, in <module>
File "c:\users\guter\appdata\local\programs\python\python36-32\lib\site-
packages\djangocms_installer\main.py", line 36, in
execute
install.check_install(config_data)
File "c:\users\guter\appdata\local\programs\python\python36-32\lib\site-
packages\djangocms_installer\install\__init__.py",
line 79, in check_install
raise EnvironmentError('\n'.join(errors))

OSError: Pillow is not installed check for installation errors and see
"Libraries installation issues" documentation section:
https://djangocms-installer.readthedocs.io/en/latest/libraries.html

安装 PIL 时似乎缺少 libjpeg(用于 Pillow 中的 JPEG 支持)和 zlib(用于 Pillow 中的 PNG 支持),但是是否有“简单”的方式在 Windows 上获取它们?禁用不是解决方案,因为它们是 django-cms 需要的...

也许 this解决方案会起作用,但对于 virtualenv,它不是一个很好的解决方法......

但是问题应该是可以解决的吧? ;-)

最佳答案

您正在链接到旧版本的文档。最新版本https://pillow.readthedocs.io/en/4.1.1/installation.html说:

In general, we aim to support all current versions of Linux, macOS, and Windows.

但是:

We don’t recommend trying to build on Windows. It is a maze of twisty passages, mostly dead ends. There are build scripts and notes for the Windows build in the w i n b u i l d directory.

但是:

We provide Pillow binaries for Windows compiled for the matrix of supported Pythons in both 32 and 64-bit versions in wheel, egg, and executable installers. These binaries have all of the optional libraries included

所以我建议你按照通常的方式使用pip安装。

关于windows - 如何在 Windows 上安装 Pillow 依赖项(没有二进制文件)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43675791/

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