Kivy: macOS 10.13 Python2.7.10 Installer l'erreur kivy via pip

Créé le 4 nov. 2017  ·  9Commentaires  ·  Source: kivy/kivy

Versions

  • Python : 2.7.10
  • Système d'exploitation : macOS 10.13 High Sierra
  • Kivy : N/A
  • Méthode d'installation de Kivy : sudo pip install kivy

La description

Tentative d'installation de Kivy en utilisant la méthode pip. J'ai installé avec succès Cython et les autres pré-requis via Homebrew.
Je reçois l'erreur ci-dessous en entrant "sudo pip install kivy"

Code et journaux

Commande "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-lzJfp5/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-lPcVuX-record/install-record.txt --single-version-externally-managed --compile" a échoué avec le code d'erreur 1 dans /private/tmp/pip-build-lzJfp5/kivy/

Commentaire le plus utile

@parabolize Je ne suis pas un utilisateur Mac, mais cela ressemble à un problème d'autorisation à cause du journal ci-dessous :

...
    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
...

Vous pouvez donc essayer d'ajouter le drapeau --user à votre installation pip.

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

Tous les 9 commentaires

Merci d'avoir ouvert votre premier numéro ici ! Assurez-vous de suivre le modèle de problème !

@krauseling Bonjour, veuillez exécuter pip install avec --verbose. Cette sortie est très générique et pas utile du tout.

@KeyWeeUsr , merci pour la réponse. Voici une sortie plus détaillée mais pas tout en raison de la longueur maximale.

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

Erreur
Nettoyer...
Suppression de la source dans /private/tmp/pip-build-ZqJR8f/kivy
Commande "/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" a échoué avec le code d'erreur 1 dans /private/tmp/pip-build-ZqJR8f/kivy/
Informations sur les exceptions :
Traceback (appel le plus récent en dernier) :
Fichier "/Library/Python/2.7/site-packages/pip/basecommand.py", ligne 215, dans main
status = self.run(options, arguments)
Fichier "/Library/Python/2.7/site-packages/pip/commands/install.py", ligne 342, en cours d'exécution
prefix=options.prefix_path,
Fichier "/Library/Python/2.7/site-packages/pip/req/req_set.py", ligne 784, dans install
**kwargs
Fichier "/Library/Python/2.7/site-packages/pip/req/req_install.py", ligne 878, dans install
fileur = fileur,
Fichier "/Library/Python/2.7/site-packages/pip/utils/__init__.py", ligne 707, dans call_subprocess
% (command_desc, proc.returncode, cwd))
Erreur d'installation : commande "/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" a échoué avec le code d'erreur 1 dans /private/tmp/pip-build-ZqJR8f/kivy/

On dirait #5457

Comme l'a dit @parabolize , il s'agit du problème lié à SDL2_mixer. Essayez d'installer de cette façon la branche master :

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

et il devrait compiler correctement.

Cela n'a pas fonctionné non plus... :/
J'ai collé l'intégralité du résultat de votre suggestion sur Pastebin, lien ci-dessous.

https://pastebin.com/qPcE3Umx

@parabolize Je ne suis pas un utilisateur Mac, mais cela ressemble à un problème d'autorisation à cause du journal ci-dessous :

...
    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
...

Vous pouvez donc essayer d'ajouter le drapeau --user à votre installation pip.

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

Kivy-1.10.1.dev0 installé avec succès
Nettoyer...

Bonnes choses @AndreMiras ! Cela a finalement fait l'affaire. Merci beaucoup à vous tous pour l'aide. J'ai hâte de faire de Kivy de jolies applications.

J'ai eu le même problème avec python 3.6.2 sur High Sierra et la solution @AndreMiras a fonctionné ! Merci!

Cette page vous a été utile?
0 / 5 - 0 notes