在 Cygwin 上安装 PIL

发布于 2024-08-31 18:15:38 字数 2116 浏览 6 评论 0原文

我整个上午都在努力将 PIL 安装在 Cygwin 上。我得到的错误与我使用 Google 发现的常见错误不一致。也许 Linux 大师可以在这个输出中看到一个明显的问题:

$ python setup.py install
running install
running build
running build_py
running build_ext
building '_imaging' extension
gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_LIBZ -I/usr/include/freetype2 -IlibImaging -I/usr/include -I/usr/include/python2.5 -c _imaging.c -o build/temp.cygwin-1.7.2-i686-2.5/_imaging.o
In file included from /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/syslimits.h:7,
                 from /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/limits.h:11,
                 from /usr/include/python2.5/Python.h:18,
                 from _imaging.c:75:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/limits.h:122:61: limits.h: No such file or directory
In file included from _imaging.c:75:
/usr/include/python2.5/Python.h:32:19: stdio.h: No such file or directory
/usr/include/python2.5/Python.h:34:5: #error "Python.h requires that stdio.h define NULL."
/usr/include/python2.5/Python.h:37:20: string.h: No such file or directory
/usr/include/python2.5/Python.h:39:19: errno.h: No such file or directory
/usr/include/python2.5/Python.h:41:20: stdlib.h: No such file or directory
/usr/include/python2.5/Python.h:43:20: unistd.h: No such file or directory
/usr/include/python2.5/Python.h:55:20: assert.h: No such file or directory
In file included from /usr/include/python2.5/Python.h:57,
                 from _imaging.c:75:
/usr/include/python2.5/pyport.h:7:20: stdint.h: No such file or directory
In file included from /usr/include/python2.5/Python.h:57,
                 from _imaging.c:75:
/usr/include/python2.5/pyport.h:89: error: parse error before "Py_uintptr_t"
/usr/include/python2.5/pyport.h:89: warning: type defaults to `int' in declaration of `Py_uintptr_t'
/usr/include/python2.5/pyport.h:89: warning: data definition has no type or storage class
/usr/include/python2.5/pyport.h:90: error: parse error before "Py_intptr_t"
/usr/include/python2.5/pyport.h:90: warning: type defaults to `int' in declaration of `Py_intptr_t'

...更多像这样的行

I've been struggling all morning to get PIL installed on Cygwin. The errors I get are not consistent with common errors I find using Google. Perhaps a linux guru can see an obvious problem in this output:

$ python setup.py install
running install
running build
running build_py
running build_ext
building '_imaging' extension
gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_LIBZ -I/usr/include/freetype2 -IlibImaging -I/usr/include -I/usr/include/python2.5 -c _imaging.c -o build/temp.cygwin-1.7.2-i686-2.5/_imaging.o
In file included from /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/syslimits.h:7,
                 from /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/limits.h:11,
                 from /usr/include/python2.5/Python.h:18,
                 from _imaging.c:75:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/limits.h:122:61: limits.h: No such file or directory
In file included from _imaging.c:75:
/usr/include/python2.5/Python.h:32:19: stdio.h: No such file or directory
/usr/include/python2.5/Python.h:34:5: #error "Python.h requires that stdio.h define NULL."
/usr/include/python2.5/Python.h:37:20: string.h: No such file or directory
/usr/include/python2.5/Python.h:39:19: errno.h: No such file or directory
/usr/include/python2.5/Python.h:41:20: stdlib.h: No such file or directory
/usr/include/python2.5/Python.h:43:20: unistd.h: No such file or directory
/usr/include/python2.5/Python.h:55:20: assert.h: No such file or directory
In file included from /usr/include/python2.5/Python.h:57,
                 from _imaging.c:75:
/usr/include/python2.5/pyport.h:7:20: stdint.h: No such file or directory
In file included from /usr/include/python2.5/Python.h:57,
                 from _imaging.c:75:
/usr/include/python2.5/pyport.h:89: error: parse error before "Py_uintptr_t"
/usr/include/python2.5/pyport.h:89: warning: type defaults to `int' in declaration of `Py_uintptr_t'
/usr/include/python2.5/pyport.h:89: warning: data definition has no type or storage class
/usr/include/python2.5/pyport.h:90: error: parse error before "Py_intptr_t"
/usr/include/python2.5/pyport.h:90: warning: type defaults to `int' in declaration of `Py_intptr_t'

... more lines like this

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

心房敞 2024-09-07 18:15:38

看起来你需要安装 GNU libC,因为
syslimits.h;限制.h;错误号.h;标准库.h; assert.h等都属于它。

对于 Windows,您可以获得二进制安装程序;如果您不想在 CYGWIN 下构建 PIL,您可以选择其中之一,http ://www.pythonware.com/products/pil/#Downloads

Looks like you need to install GNU libC, because
syslimits.h; limits.h; errno.h; stdlib.h; assert.h etc. all belong to it.

For windows you get binary installers; incase you don't want to build PIL under CYGWIN, you can choose from one of these, http://www.pythonware.com/products/pil/#Downloads

对你再特殊 2024-09-07 18:15:38

您可以下载新的 cygwin 二进制文件并在 Python 部分安装映像库。这将使 PIL 可与 cygwin python 2.7 一起使用。

You may download a fresh cygwin binary and install imaging libraries in Python section. That will make PIL available for using with cygwin python 2.7.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文