Ich versuche, das Paket zu installierenAbonnierenfür Python (auf Macos), aber ich erhalte die Fehlermeldung „Fehler: Befehl ‚gcc‘ ist mit Exit-Status 1 fehlgeschlagen“. Ich habe bereits alle Parameter der Datei setup.py überprüft, nämlich MATLAB_COMMAND, MATLAB_VERSION, MATLAB_DIR und PLATFORM_DIR. Ich habe auch das neueste Xcode (und gcc ist über die Befehlszeile verfügbar). Hat jemand eine Idee, wie man das lösen kann?
Hier ist die vollständige Ausgabe beim Versuch, das Paket zu installieren mitpython setup.py install
running install
running build
running build_py
running build_ext
building 'mlabrawmodule' extension
gcc -fno-strict-aliasing -I/Users/mactobe/anaconda/envs/SIPLCA27/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D_V6_5_OR_LATER=1 -D_V7_3_OR_LATER=1 -I/Applications/MATLAB_R2018a.app/extern/include -I/Users/mactobe/anaconda/envs/SIPLCA27/lib/python2.7/site-packages/numpy/core/include -I/Users/mactobe/anaconda/envs/SIPLCA27/include/python2.7 -c mlabraw.cpp -o build/temp.macosx-10.6-x86_64-2.7/mlabraw.o
In file included from mlabraw.cpp:136:
In file included from /Users/mactobe/anaconda/envs/SIPLCA27/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /Users/mactobe/anaconda/envs/SIPLCA27/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
In file included from /Users/mactobe/anaconda/envs/SIPLCA27/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822:
/Users/mactobe/anaconda/envs/SIPLCA27/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning:
"Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it with " \
^
mlabraw.cpp:246:11: error: use of undeclared identifier 'mxGetPiIsDeprecated'
lPI = mxGetPi(pArray);
^
/Applications/MATLAB_R2018a.app/extern/include/matrix.h:608:17: note: expanded from macro 'mxGetPi'
#define mxGetPi mxGetPiIsDeprecated
^
mlabraw.cpp:369:8: error: use of undeclared identifier 'mxGetPiIsDeprecated'
lI = mxGetPi(lRetval);
^
/Applications/MATLAB_R2018a.app/extern/include/matrix.h:608:17: note: expanded from macro 'mxGetPi'
#define mxGetPi mxGetPiIsDeprecated
^
mlabraw.cpp:373:10: warning: 'NPY_CHAR' is deprecated: Use NPY_STRING [-Wdeprecated-declarations]
case PyArray_CHAR:
^
/Users/mactobe/anaconda/envs/SIPLCA27/lib/python2.7/site-packages/numpy/core/include/numpy/old_defines.h:49:29: note: expanded
from macro 'PyArray_CHAR'
#define PyArray_CHAR NPY_CHAR
^
/Users/mactobe/anaconda/envs/SIPLCA27/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:84:30: note:
'NPY_CHAR' has been explicitly marked deprecated here
NPY_CHAR NPY_ATTR_DEPRECATE("Use NPY_STRING"),
^
/Users/mactobe/anaconda/envs/SIPLCA27/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:25:50: note: expanded
from macro 'NPY_ATTR_DEPRECATE'
#define NPY_ATTR_DEPRECATE(text) __attribute__ ((deprecated (text)))
^
mlabraw.cpp:418:10: warning: 'NPY_CHAR' is deprecated: Use NPY_STRING [-Wdeprecated-declarations]
case PyArray_CHAR:
^
/Users/mactobe/anaconda/envs/SIPLCA27/lib/python2.7/site-packages/numpy/core/include/numpy/old_defines.h:49:29: note: expanded
from macro 'PyArray_CHAR'
#define PyArray_CHAR NPY_CHAR
^
/Users/mactobe/anaconda/envs/SIPLCA27/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:84:30: note:
'NPY_CHAR' has been explicitly marked deprecated here
NPY_CHAR NPY_ATTR_DEPRECATE("Use NPY_STRING"),
^
/Users/mactobe/anaconda/envs/SIPLCA27/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:25:50: note: expanded
from macro 'NPY_ATTR_DEPRECATE'
#define NPY_ATTR_DEPRECATE(text) __attribute__ ((deprecated (text)))
^
mlabraw.cpp:509:37: warning: conversion from string literal to 'char *' is deprecated
[-Wc++11-compat-deprecated-writable-strings]
arp = PyObject_CallMethod(pSrc, "__array__", NULL);
^
mlabraw.cpp:570:16: warning: conversion from string literal to 'char *' is deprecated
[-Wc++11-compat-deprecated-writable-strings]
char *lStr = "\0"; // "matlab -check_malloc";
^
mlabraw.cpp:631:15: warning: conversion from string literal to 'char *' is deprecated
[-Wc++11-compat-deprecated-writable-strings]
char* fmt = "try, %s; MLABRAW_ERROR_=0; catch, MLABRAW_ERROR_=1; end;";
^
mlabraw.cpp:662:50: warning: conversion from string literal to 'char *' is deprecated
[-Wc++11-compat-deprecated-writable-strings]
if (NULL == (lArray = _getMatlabVar(lHandle, "MLABRAW_ERROR_")) ) {
^
mlabraw.cpp:895:38: warning: conversion from string literal to 'char *' is deprecated
[-Wc++11-compat-deprecated-writable-strings]
mlabraw_error = PyErr_NewException("mlabraw.error", NULL, NULL);
^
8 warnings and 2 errors generated.
error: command 'gcc' failed with exit status 1