我正在尝试安装最新的Kivy(开发版)。我遇到错误(详细日志附在下面)。以下是我的环境:
操作系统:macOS Sierra 10.12.6(16G1212) Python:3.6(关于虚拟环境)我做过(关注Official Installation Guide
brew install pkg-config sdl2 sdl2_image sdl2_ttf sdl2_mixer gstreamer
pip install Cython==0.26.1
然后:
pip install kivy
在此失败后,我尝试按Kivy Issue Tracker
中的建议安装开发版USE_OSX_FRAMEWORKS=0 pip install https://github.com/kivy/kivy/zipball/master
我得到的错误:
.... There are lot of log before this .......
In file included from /private/var/folders/m_/cxdqcdn179x_rxt6ly6k216w0000gn/T/pip-0g4ixb48-build/kivy/lib/gstplayer/_gstplayer.c:482:
In file included from /usr/local/Cellar/gstreamer/1.12.4/include/gstreamer-1.0/gst/gst.h:89:
/usr/local/Cellar/gstreamer/1.12.4/include/gstreamer-1.0/gst/gstutils.h:159:27: warning: shift count >= width of type [-Wshift-count-overflow]
*(guint64*)(void*)(p) = GUINT64_SWAP_LE_BE (v);
^~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/gtypes.h:247:40: note: expanded from macro 'GUINT64_SWAP_LE_BE'
# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_IA32 (val))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/gtypes.h:234:18: note: expanded from macro 'GUINT64_SWAP_LE_BE_IA32'
__r.__ll = GUINT64_SWAP_LE_BE_CONSTANT (__w.__ll); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/gtypes.h:175:53: note: expanded from macro 'GUINT64_SWAP_LE_BE_CONSTANT'
(guint64) G_GINT64_CONSTANT (0x00ff000000000000U)) >> 40) | \
^ ~~
In file included from /private/var/folders/m_/cxdqcdn179x_rxt6ly6k216w0000gn/T/pip-0g4ixb48-build/kivy/lib/gstplayer/_gstplayer.c:482:
In file included from /usr/local/Cellar/gstreamer/1.12.4/include/gstreamer-1.0/gst/gst.h:89:
/usr/local/Cellar/gstreamer/1.12.4/include/gstreamer-1.0/gst/gstutils.h:159:27: warning: shift count >= width of type [-Wshift-count-overflow]
*(guint64*)(void*)(p) = GUINT64_SWAP_LE_BE (v);
^~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/gtypes.h:247:40: note: expanded from macro 'GUINT64_SWAP_LE_BE'
# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_IA32 (val))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/gtypes.h:234:18: note: expanded from macro 'GUINT64_SWAP_LE_BE_IA32'
__r.__ll = GUINT64_SWAP_LE_BE_CONSTANT (__w.__ll); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/gtypes.h:177:53: note: expanded from macro 'GUINT64_SWAP_LE_BE_CONSTANT'
(guint64) G_GINT64_CONSTANT (0xff00000000000000U)) >> 56)))
^ ~~
In file included from /private/var/folders/m_/cxdqcdn179x_rxt6ly6k216w0000gn/T/pip-0g4ixb48-build/kivy/lib/gstplayer/_gstplayer.c:482:
In file included from /usr/local/Cellar/gstreamer/1.12.4/include/gstreamer-1.0/gst/gst.h:89:
/usr/local/Cellar/gstreamer/1.12.4/include/gstreamer-1.0/gst/gstutils.h:549:9: warning: shift count >= width of type [-Wshift-count-overflow]
u.i = GUINT64_SWAP_LE_BE (u.i);
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/gtypes.h:247:40: note: expanded from macro 'GUINT64_SWAP_LE_BE'
# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_IA32 (val))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/gtypes.h:234:18: note: expanded from macro 'GUINT64_SWAP_LE_BE_IA32'
__r.__ll = GUINT64_SWAP_LE_BE_CONSTANT (__w.__ll); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/gtypes.h:163:53: note: expanded from macro 'GUINT64_SWAP_LE_BE_CONSTANT'
(guint64) G_GINT64_CONSTANT (0x00000000000000ffU)) << 56) | \
^ ~~
In file included from /private/var/folders/m_/cxdqcdn179x_rxt6ly6k216w0000gn/T/pip-0g4ixb48-build/kivy/lib/gstplayer/_gstplayer.c:482:
In file included from /usr/local/Cellar/gstreamer/1.12.4/include/gstreamer-1.0/gst/gst.h:89:
/usr/local/Cellar/gstreamer/1.12.4/include/gstreamer-1.0/gst/gstutils.h:549:9: warning: shift count >= width of type [-Wshift-count-overflow]
u.i = GUINT64_SWAP_LE_BE (u.i);
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/gtypes.h:247:40: note: expanded from macro 'GUINT64_SWAP_LE_BE'
# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_IA32 (val))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/gtypes.h:234:18: note: expanded from macro 'GUINT64_SWAP_LE_BE_IA32'
__r.__ll = GUINT64_SWAP_LE_BE_CONSTANT (__w.__ll); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/gtypes.h:165:53: note: expanded from macro 'GUINT64_SWAP_LE_BE_CONSTANT'
(guint64) G_GINT64_CONSTANT (0x000000000000ff00U)) << 40) | \
^ ~~
In file included from /private/var/folders/m_/cxdqcdn179x_rxt6ly6k216w0000gn/T/pip-0g4ixb48-build/kivy/lib/gstplayer/_gstplayer.c:482:
In file included from /usr/local/Cellar/gstreamer/1.12.4/include/gstreamer-1.0/gst/gst.h:89:
/usr/local/Cellar/gstreamer/1.12.4/include/gstreamer-1.0/gst/gstutils.h:549:9: warning: shift count >= width of type [-Wshift-count-overflow]
u.i = GUINT64_SWAP_LE_BE (u.i);
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/gtypes.h:247:40: note: expanded from macro 'GUINT64_SWAP_LE_BE'
# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_IA32 (val))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/gtypes.h:234:18: note: expanded from macro 'GUINT64_SWAP_LE_BE_IA32'
__r.__ll = GUINT64_SWAP_LE_BE_CONSTANT (__w.__ll); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/gtypes.h:175:53: note: expanded from macro 'GUINT64_SWAP_LE_BE_CONSTANT'
(guint64) G_GINT64_CONSTANT (0x00ff000000000000U)) >> 40) | \
^ ~~
In file included from /private/var/folders/m_/cxdqcdn179x_rxt6ly6k216w0000gn/T/pip-0g4ixb48-build/kivy/lib/gstplayer/_gstplayer.c:482:
In file included from /usr/local/Cellar/gstreamer/1.12.4/include/gstreamer-1.0/gst/gst.h:89:
/usr/local/Cellar/gstreamer/1.12.4/include/gstreamer-1.0/gst/gstutils.h:549:9: warning: shift count >= width of type [-Wshift-count-overflow]
u.i = GUINT64_SWAP_LE_BE (u.i);
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/gtypes.h:247:40: note: expanded from macro 'GUINT64_SWAP_LE_BE'
# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_IA32 (val))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/gtypes.h:234:18: note: expanded from macro 'GUINT64_SWAP_LE_BE_IA32'
__r.__ll = GUINT64_SWAP_LE_BE_CONSTANT (__w.__ll); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/gtypes.h:177:53: note: expanded from macro 'GUINT64_SWAP_LE_BE_CONSTANT'
(guint64) G_GINT64_CONSTANT (0xff00000000000000U)) >> 56)))
^ ~~
12 warnings and 1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
答案 0 :(得分:0)
谢谢大家,更新Cython修复:
$pip install cython --upgrade