Kivy: macOS 10.13 Python2.7.10 Instalar kivy error a través de pip

Creado en 4 nov. 2017  ·  9Comentarios  ·  Fuente: kivy/kivy

Versiones

  • Python: 2.7.10
  • SO: macOS 10.13 High Sierra
  • Kivy: N / A
  • Método de instalación de Kivy: sudo pip install kivy

Descripción

Intentando instalar Kivy usando el método pip. He instalado Cython con éxito y los otros requisitos previos a través de Homebrew.
Recibo el siguiente error al ingresar "sudo pip install kivy"

Código y registros

Comando "/ usr / bin / python -u -c" import setuptools, tokenize; __ file __ = '/ private / tmp / pip-build-lzJfp5 / kivy / setup.py'; f = getattr (tokenize, 'open', open ) (__ archivo __); código = f.read (). replace ('rn', 'n'); f.close (); exec (compile (code, __file__, 'exec')) "install --record / tmp /pip-lPcVuX-record/install-record.txt --single-version-externally-managed --compile "falló con el código de error 1 en / private / tmp / pip-build-lzJfp5 / kivy /

Comentario más útil

@parabolize No soy un usuario de mac, pero me parece un problema de permiso debido al registro a continuación:

...
    running install_data
    creating /System/Library/Frameworks/Python.framework/Versions/2.7/share
     error: could not create '/System/Library/Frameworks/Python.framework/Versions/2.7/share': Operation not permitted
error
...

Entonces podría intentar agregar la bandera --user a su instalación de pip.

pip install --user --verbose https://github.com/kivy/kivy/zipball/master

Todos 9 comentarios

👋 ¡Gracias por abrir su primer número aquí! ¡Asegúrese de seguir la plantilla de problemas!

@krauseling Hola, ejecute pip install con --verbose. Esta salida es muy genérica y no es útil en absoluto.

@KeyWeeUsr , gracias por la respuesta. Aquí hay una salida más detallada, pero no toda debido a la longitud máxima.

cythoning /private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/vertex_instructions.pyx to /private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/vertex_instructions.c
building 'kivy.graphics.vertex_instructions' extension
cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -arch x86_64 -I/private/tmp/pip-build-ZqJR8f/kivy/kivy/include -I/private/tmp/pip-build-ZqJR8f/kivy/kivy/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c /private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/vertex_instructions.c -o build/temp.macosx-10.13-intel-2.7/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/vertex_instructions.o -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks
In file included from /private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/vertex_instructions.c:242:
In file included from /private/tmp/pip-build-ZqJR8f/kivy/kivy/include/gl_redirect.h:53:
/private/tmp/pip-build-ZqJR8f/kivy/kivy/include/common_subset.h:461:9: warning: 'GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS' macro redefined [-Wmacro-redefined]
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT
        ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/include/gl_redirect.h:30:9: note: previous definition is here
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS        0x8CD9
        ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/vertex_instructions.c:16906:15: warning: implicit conversion loses integer precision: 'Py_ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
  __pyx_v_l = __pyx_t_2;
            ~ ^~~~~~~~~
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/vertex_instructions.c:55505:32: warning: unused function '__Pyx_PyUnicode_FromString' [-Wunused-function]
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
                               ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/vertex_instructions.c:332:29: warning: unused function '__Pyx_Py_UNICODE_strlen' [-Wunused-function]
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
                            ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/vertex_instructions.c:55682:33: warning: unused function '__Pyx_PyInt_FromSize_t' [-Wunused-function]
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
                                ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/vertex_instructions.c:51864:26: warning: unused function '__Pyx_GetBufferAndValidate' [-Wunused-function]
static CYTHON_INLINE int __Pyx_GetBufferAndValidate(
                         ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/vertex_instructions.c:51898:27: warning: unused function '__Pyx_SafeReleaseBuffer' [-Wunused-function]
static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
                          ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/vertex_instructions.c:51970:1: warning: unused function '__pyx_add_acquisition_count_locked' [-Wunused-function]
__pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/vertex_instructions.c:51980:1: warning: unused function '__pyx_sub_acquisition_count_locked' [-Wunused-function]
__pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/vertex_instructions.c:4354:26: warning: unused function 'resize' [-Wunused-function]
static CYTHON_INLINE int resize(arrayobject *self, Py_ssize_t n) {
                         ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/vertex_instructions.c:54458:32: warning: unused function '__Pyx_PyInt_From_unsigned_long' [-Wunused-function]
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value) {
                               ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/vertex_instructions.c:54829:27: warning: function '__Pyx_PyInt_As_char' is not needed and will not be emitted [-Wunneeded-internal-declaration]
static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
                          ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/vertex_instructions.c:35183:35: warning: unused function '__pyx_f_7cpython_5array_copy' [-Wunused-function]
static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_copy(arrayobject *__pyx_v_self) {
                                  ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/vertex_instructions.c:35337:26: warning: unused function '__pyx_f_7cpython_5array_extend' [-Wunused-function]
static CYTHON_INLINE int __pyx_f_7cpython_5array_extend(arrayobject *__pyx_v_self, arrayobject *__pyx_v_other) {
                         ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/vertex_instructions.c:35411:27: warning: unused function '__pyx_f_7cpython_5array_zero' [-Wunused-function]
static CYTHON_INLINE void __pyx_f_7cpython_5array_zero(arrayobject *__pyx_v_self) {
                          ^
15 warnings generated.
cc -bundle -undefined dynamic_lookup -Wl,-F. -arch x86_64 build/temp.macosx-10.13-intel-2.7/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/vertex_instructions.o -o build/lib.macosx-10.13-intel-2.7/kivy/graphics/vertex_instructions.so -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks -lm
cythoning /private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.pyx to /private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.c
building 'kivy.graphics.texture' extension
cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -arch x86_64 -I/private/tmp/pip-build-ZqJR8f/kivy/kivy/include -I/private/tmp/pip-build-ZqJR8f/kivy/kivy/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c /private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.c -o build/temp.macosx-10.13-intel-2.7/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.o -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks
In file included from /private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.c:242:
In file included from /private/tmp/pip-build-ZqJR8f/kivy/kivy/include/gl_redirect.h:53:
/private/tmp/pip-build-ZqJR8f/kivy/kivy/include/common_subset.h:461:9: warning: 'GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS' macro redefined [-Wmacro-redefined]
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT
        ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/include/gl_redirect.h:30:9: note: previous definition is here
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS        0x8CD9
        ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.c:5152:24: warning: implicit conversion loses integer precision: 'Py_ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
    __pyx_v_datasize = __pyx_t_7;
                     ~ ^~~~~~~~~
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.c:38248:32: warning: unused function '__Pyx_PyUnicode_FromString' [-Wunused-function]
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
                               ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.c:332:29: warning: unused function '__Pyx_Py_UNICODE_strlen' [-Wunused-function]
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
                            ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.c:34975:26: warning: unused function '__Pyx_GetBufferAndValidate' [-Wunused-function]
static CYTHON_INLINE int __Pyx_GetBufferAndValidate(
                         ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.c:35009:27: warning: unused function '__Pyx_SafeReleaseBuffer' [-Wunused-function]
static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
                          ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.c:35081:1: warning: unused function '__pyx_add_acquisition_count_locked' [-Wunused-function]
__pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.c:35091:1: warning: unused function '__pyx_sub_acquisition_count_locked' [-Wunused-function]
__pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.c:35640:32: warning: unused function '__Pyx_PyTuple_GetSlice' [-Wunused-function]
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(
                               ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.c:35670:32: warning: unused function '__Pyx_GetItemInt_List_Fast' [-Wunused-function]
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                               ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.c:35685:32: warning: unused function '__Pyx_GetItemInt_Tuple_Fast' [-Wunused-function]
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                               ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.c:3946:26: warning: unused function 'resize' [-Wunused-function]
static CYTHON_INLINE int resize(arrayobject *self, Py_ssize_t n) {
                         ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.c:7182:26: warning: unused function '__pyx_f_4kivy_8graphics_7texture__is_gl_format_supported' [-Wunused-function]
static CYTHON_INLINE int __pyx_f_4kivy_8graphics_7texture__is_gl_format_supported(PyObject *__pyx_v_x) {
                         ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.c:19255:35: warning: unused function '__pyx_f_7cpython_5array_copy' [-Wunused-function]
static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_copy(arrayobject *__pyx_v_self) {
                                  ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.c:19409:26: warning: unused function '__pyx_f_7cpython_5array_extend' [-Wunused-function]
static CYTHON_INLINE int __pyx_f_7cpython_5array_extend(arrayobject *__pyx_v_self, arrayobject *__pyx_v_other) {
                         ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.c:19483:27: warning: unused function '__pyx_f_7cpython_5array_zero' [-Wunused-function]
static CYTHON_INLINE void __pyx_f_7cpython_5array_zero(arrayobject *__pyx_v_self) {
                          ^
16 warnings generated.
cc -bundle -undefined dynamic_lookup -Wl,-F. -arch x86_64 build/temp.macosx-10.13-intel-2.7/private/tmp/pip-build-ZqJR8f/kivy/kivy/graphics/texture.o -o build/lib.macosx-10.13-intel-2.7/kivy/graphics/texture.so -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks -lm
cythoning /private/tmp/pip-build-ZqJR8f/kivy/kivy/core/audio/audio_sdl2.pyx to /private/tmp/pip-build-ZqJR8f/kivy/kivy/core/audio/audio_sdl2.c
building 'kivy.core.audio.audio_sdl2' extension
creating build/temp.macosx-10.13-intel-2.7/private/tmp/pip-build-ZqJR8f/kivy/kivy/core/audio
cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -arch x86_64 -I/private/tmp/pip-build-ZqJR8f/kivy/kivy/include -I/usr/local/include/SDL2 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c /private/tmp/pip-build-ZqJR8f/kivy/kivy/core/audio/audio_sdl2.c -o build/temp.macosx-10.13-intel-2.7/private/tmp/pip-build-ZqJR8f/kivy/kivy/core/audio/audio_sdl2.o -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks
/private/tmp/pip-build-ZqJR8f/kivy/kivy/core/audio/audio_sdl2.c:1374:63: error: use of undeclared identifier 'MIX_INIT_MODPLUG'; did you mean 'MIX_INIT_MOD'?
  __pyx_v_want_flags = (__pyx_v_want_flags | ((MIX_INIT_MOD | MIX_INIT_MODPLUG) | MIX_INIT_FLUIDSYNTH));
                                                              ^~~~~~~~~~~~~~~~
                                                              MIX_INIT_MOD
/usr/local/include/SDL2/SDL_mixer.h:80:5: note: 'MIX_INIT_MOD' declared here
    MIX_INIT_MOD    = 0x00000002,
    ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/core/audio/audio_sdl2.c:1374:83: error: use of undeclared identifier 'MIX_INIT_FLUIDSYNTH'
  __pyx_v_want_flags = (__pyx_v_want_flags | ((MIX_INIT_MOD | MIX_INIT_MODPLUG) | MIX_INIT_FLUIDSYNTH));
                                                                                  ^
/private/tmp/pip-build-ZqJR8f/kivy/kivy/core/audio/audio_sdl2.c:4527:69: error: use of undeclared identifier 'MIX_INIT_MODPLUG'; did you mean 'MIX_INIT_MOD'?
  __pyx_t_2 = ((__pyx_v_4kivy_4core_5audio_10audio_sdl2_mix_flags & MIX_INIT_MODPLUG) != 0);
                                                                    ^~~~~~~~~~~~~~~~
                                                                    MIX_INIT_MOD
/usr/local/include/SDL2/SDL_mixer.h:80:5: note: 'MIX_INIT_MOD' declared here
    MIX_INIT_MOD    = 0x00000002,
    ^
3 errors generated.
 error: command 'cc' failed with exit status 1

error
Limpiar...
Eliminando la fuente en / private / tmp / pip-build-ZqJR8f / kivy
Comando "/ usr / bin / python -u -c" import setuptools, tokenize; __ file __ = '/ private / tmp / pip-build-ZqJR8f / kivy / setup.py'; f = getattr (tokenize, 'open', open ) (__ archivo __); código = f.read (). replace ('rn', 'n'); f.close (); exec (compile (code, __file__, 'exec')) "install --record / tmp /pip-LtAhbV-record/install-record.txt --single-version-externally-managed --compile "falló con el código de error 1 en / private / tmp / pip-build-ZqJR8f / kivy /
Información de excepción:
Rastreo (llamadas recientes más última):
Archivo "/Library/Python/2.7/site-packages/pip/basecommand.py", línea 215, en main
status = self.run (opciones, argumentos)
Archivo "/Library/Python/2.7/site-packages/pip/commands/install.py", línea 342, en ejecución
prefix = options.prefix_path,
Archivo "/Library/Python/2.7/site-packages/pip/req/req_set.py", línea 784, en instalación
** kwargs
Archivo "/Library/Python/2.7/site-packages/pip/req/req_install.py", línea 878, en instalación
ruleta = ruleta,
Archivo "/Library/Python/2.7/site-packages/pip/utils/__init__.py", línea 707, en call_subprocess
% (command_desc, proc.returncode, cwd))
Error de instalación: Comando "/ usr / bin / python -u -c" import setuptools, tokenize; __ file __ = '/ private / tmp / pip-build-ZqJR8f / kivy / setup.py'; f = getattr (tokenize, 'open' , open) (__ file __); code = f.read (). replace ('rn', 'n'); f.close (); exec (compile (code, __file__, 'exec')) "install --record /tmp/pip-LtAhbV-record/install-record.txt --single-version-externally-managed --compile "falló con el código de error 1 en / private / tmp / pip-build-ZqJR8f / kivy /

Parece el n. ° 5457

Como dijo @parabolize , es el problema relacionado con SDL2_mixer. Intente instalar de esta manera la rama maestra:

pip install --verbose https://github.com/kivy/kivy/zipball/master

y debería compilarse correctamente.

Eso tampoco funcionó ...: /
He pegado la totalidad del resultado de su sugerencia en Pastebin, enlace a continuación.

https://pastebin.com/qPcE3Umx

@parabolize No soy un usuario de mac, pero me parece un problema de permiso debido al registro a continuación:

...
    running install_data
    creating /System/Library/Frameworks/Python.framework/Versions/2.7/share
     error: could not create '/System/Library/Frameworks/Python.framework/Versions/2.7/share': Operation not permitted
error
...

Entonces podría intentar agregar la bandera --user a su instalación de pip.

pip install --user --verbose https://github.com/kivy/kivy/zipball/master

Kivy-1.10.1.dev0 instalado correctamente
Limpiar...

¡Buenas cosas @AndreMiras! Eso finalmente funcionó. Muchas gracias a todos por la ayuda. Espero poder convertir kivy en algunas aplicaciones dulces.

¡Tuve el mismo problema con Python 3.6.2 en High Sierra y la solución @AndreMiras funcionó! ¡Gracias!

¿Fue útil esta página
0 / 5 - 0 calificaciones