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

时间:2017-04-28 08:40:28

标签: windows zlib django-cms pillow libjpeg

我试图在虚拟环境中使用Python3在Windows 10上运行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

似乎 libjpeg (对于Pillow中的JPEG支持)和PIL的安装缺少 zlib (对于Pillow中的PNG支持),但是有& #34;易&#34;在Windows上获取它们的方式?禁用不是解决方案,因为它们适用于所需的django-cms ......

也许this解决方案可行,但对于virtualenv,它不是一个漂亮的解决方法......

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

3 个答案:

答案 0 :(得分:2)

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

  

在   一般来说,我们的目标是支持所有当前版本的Linux,macOS和   视窗。

可是:

  

我们不建议尝试在Windows上构建。这是一个迷宫   曲折的段落,大多是死路一条。有构建脚本和注释   用于在Windows目录中构建Windows。

然而:

  

我们为Windows编译的Windows提供Pillow二进制文件   支持Pythons的32位和64位版本的wheel,egg和   可执行安装程序。这些二进制文件包含所有可选库   包括

所以我建议你以通常的方式安装pip。

答案 1 :(得分:0)

我遇到了同样的问题。 您应该尝试通过easy_install安装Pillow:

easy_install Pillow

答案 2 :(得分:0)

我尝试了这个并且它解决了问题,枕头工作正常,我不知道发生了什么事,因为我正在使用这个用于Django服务器目的。

easy_install Pillow

这适用于Windows 10 64位

相关问题