为什么我不能在我的Mac上安装Pillow?它给出了一些错误

时间:2014-03-24 16:40:19

标签: python django macos pillow webp

这是安装Pillow的错误。我正在使用OS X Mavericks。 我尝试通过pip install安装Pillow ..

_imaging.c:391:28: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
                int temp = PyInt_AsLong(op);
                    ~~~~   ^~~~~~~~~~~~~~~~
_imaging.c:397:28: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
                int temp = PyInt_AsLong(op);
                    ~~~~   ^~~~~~~~~~~~~~~~
_imaging.c:407:28: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
                int temp = PyInt_AsLong(op);
                    ~~~~   ^~~~~~~~~~~~~~~~
_imaging.c:413:28: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
                int temp = PyInt_AsLong(op);
                    ~~~~   ^~~~~~~~~~~~~~~~
_imaging.c:520:17: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
            r = PyInt_AsLong(color);
              ~ ^~~~~~~~~~~~~~~~~~~
_imaging.c:533:25: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
                    r = PyInt_AS_LONG(color);
                      ~ ^~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/intobject.h:52:51: note: expanded from macro 'PyInt_AS_LONG'
#define PyInt_AS_LONG(op) (((PyIntObject *)(op))->ob_ival)
                           ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
_imaging.c:561:13: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
        r = PyInt_AsLong(color);
          ~ ^~~~~~~~~~~~~~~~~~~
_imaging.c:575:17: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
            r = PyInt_AsLong(color);
              ~ ^~~~~~~~~~~~~~~~~~~
_imaging.c:969:14: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
        *x = PyInt_AS_LONG(value);
           ~ ^~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/intobject.h:52:51: note: expanded from macro 'PyInt_AS_LONG'
#define PyInt_AS_LONG(op) (((PyIntObject *)(op))->ob_ival)
                           ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
_imaging.c:977:14: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
        *y = PyInt_AS_LONG(value);
           ~ ^~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/intobject.h:52:51: note: expanded from macro 'PyInt_AS_LONG'
#define PyInt_AS_LONG(op) (((PyIntObject *)(op))->ob_ival)
                           ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
_imaging.c:3102:15: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
        y = i / im->xsize;
          ~ ~~^~~~~~~~~~~
12 warnings generated.

终端后来被绞死了。问题是我可以尝试以其他方式安装它,但我想知道它为什么不起作用

更新阻止我安装的事情就是当我安装webp时..它总是挂在那里..

1 个答案:

答案 0 :(得分:1)

我明白了。我实际上在这里做的是通过

安装Pillow

sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install pillow

我意识到我遇到了webp和little-cms的问题,所以我通过下载软件包手动安装它们。