【发布时间】:2014-05-02 03:54:06
【问题描述】:
这是安装 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 时。它总是挂在那里。
【问题讨论】:
-
这些似乎都可以安全地忽略警告。输出中是否有错误?
-
很难从你提供的内容中分辨出来 - 如果成功,尝试使用
python setup.py build_ext后跟python setup.py build构建 Pillow;然后回来并发布任何与点子运行不同的结果,正如他们可能会告诉的那样。 -
@RobAgar 它只是在 pip 安装后挂起
-
@fish2000 我尝试从此处pillow.readthedocs.org/en/latest/installation.html 安装先决条件,但一直在安装 webp 和 littlecms。它只是挂起..我尝试下载它并执行 python setup.py build_ext 但仍然是上面遇到的相同错误..
标签: python django macos pillow webp