Scikit-Learn failing to install on OS X: undeclared identifier and assignment errors -
in trying install scikit-learn on machine, i'm running problems. i'm running os x 10.8.4 python 2.7.5 homebrew, , have latest versions of scipy , numpy installed.
i've tried installing scikit-learn via pip cloning latest source , building scratch- every time tries build. idea what's going on here?
1 warning , 3 errors generated. in file included sklearn/feature_extraction/_hashing.c:258: in file included /usr/local/cellar/python/2.7.5/frameworks/python.framework/versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:15: in file included /usr/local/cellar/python/2.7.5/frameworks/python.framework/versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17: in file included /usr/local/cellar/python/2.7.5/frameworks/python.framework/versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728: /usr/local/cellar/python/2.7.5/frameworks/python.framework/versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2: warning: "using deprecated numpy api, disable #defining npy_no_deprecated_api npy_1_7_api_version" [-w#warnings] #warning "using deprecated numpy api, disable #defining npy_no_deprecated_api npy_1_7_api_version" ^ sklearn/feature_extraction/_hashing.c:2439:15: error: assigning 'int' incompatible type 'void' __pyx_t_2 = pyerr_badargument(); if (unlikely(__pyx_t_2 == 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 160; __pyx_clineno = __line__; goto __pyx_l1_error;} ^ ~~~~~~~~~~~~~~~~~~~ sklearn/feature_extraction/_hashing.c:4833:96: error: use of undeclared identifier 'pyboolobject' __pyx_ptype_7cpython_4bool_bool = __pyx_importtype(__pyx_builtin_module_name, "bool", sizeof(pyboolobject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 8; __pyx_clineno = __line__; goto __pyx_l1_error;} ^ sklearn/feature_extraction/_hashing.c:4834:105: error: use of undeclared identifier 'pycomplexobject' __pyx_ptype_7cpython_7complex_complex = __pyx_importtype(__pyx_builtin_module_name, "complex", sizeof(pycomplexobject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 15; __pyx_clineno = __line__; goto __pyx_l1_error;} ^ 1 warning , 3 errors generated. error: command "cc -fno-strict-aliasing -fno-common -dynamic -i/usr/local/include -i/usr/local/opt/sqlite/include -isysroot /applications/xcode.app/contents/developer/platforms/macosx.platform/developer/sdks/macosx10.8.sdk -i/applications/xcode.app/contents/developer/platforms/macosx.platform/developer/sdks/macosx10.8.sdk/system/library/frameworks/tk.framework/versions/8.5/headers -dndebug -g -fwrapv -o3 -wall -wstrict-prototypes -i/usr/local/cellar/python/2.7.5/frameworks/python.framework/versions/2.7/lib/python2.7/site-packages/numpy/core/include -i/usr/local/cellar/python/2.7.5/frameworks/python.framework/versions/2.7/lib/python2.7/site-packages/numpy/core/include -i/usr/local/cellar/python/2.7.5/frameworks/python.framework/versions/2.7/include/python2.7 -c sklearn/feature_extraction/_hashing.c -o build/temp.macosx-10.8-x86_64-2.7/sklearn/feature_extraction/_hashing.o" failed exit status 1
i had same build issue after upgrading osx 10.9 mavericks. resolved running:
xcode-select --install to update xcode command line tools.
i upgraded homebrew libraries with:
brew update brew doctor # fix reported issues brew upgrade i had uninstall , reinstall dependencies built against incompatible version of c++ standard library.
Comments
Post a Comment