pycaret / pycaret

An open-source, low-code machine learning library in Python
https://www.pycaret.org
MIT License
8.83k stars 1.76k forks source link

[INSTALL]: Fail Encountered error while try to install Numpy (Mac) #2989

Closed aidsj closed 1 year ago

aidsj commented 1 year ago

Installation check

Platform

MAC M1

Installation Method

pip install

pycaret Version

2.3.10

Python Version

3.8

Description

Have an issue installing Pycaret using pip install pycaret.

I am using a new python environment and python=3.8.

Installation Logs

numpy.core - nothing done with h_files = ['build/src.macosx-11.1-arm64-3.8/numpy/core/src/umath/funcs.inc', 'build/src.macosx-11.1-arm64-3.8/numpy/core/src/umath/simd.inc', 'build/src.macosx-11.1-arm64-3.8/numpy/core/src/umath/loops.h', 'build/src.macosx-11.1-arm64-3.8/numpy/core/src/umath/matmul.h', 'build/src.macosx-11.1-arm64-3.8/numpy/core/src/umath/clip.h', 'build/src.macosx-11.1-arm64-3.8/numpy/core/src/npymath/npy_math_internal.h', 'build/src.macosx-11.1-arm64-3.8/numpy/core/src/common/templ_common.h', 'build/src.macosx-11.1-arm64-3.8/numpy/core/include/numpy/config.h', 'build/src.macosx-11.1-arm64-3.8/numpy/core/include/numpy/_numpyconfig.h', 'build/src.macosx-11.1-arm64-3.8/numpy/core/include/numpy/__multiarray_api.h', 'build/src.macosx-11.1-arm64-3.8/numpy/core/include/numpy/__ufunc_api.h'] building extension "numpy.core._umath_tests" sources building extension "numpy.core._rational_tests" sources building extension "numpy.core._struct_ufunc_tests" sources building extension "numpy.core._operand_flag_tests" sources building extension "numpy.fft._pocketfft_internal" sources building extension "numpy.linalg.lapack_lite" sources adding 'numpy/linalg/lapack_lite/python_xerbla.c' to sources. building extension "numpy.linalg._umath_linalg" sources adding 'numpy/linalg/lapack_lite/python_xerbla.c' to sources. building extension "numpy.random.mt19937" sources building extension "numpy.random.philox" sources building extension "numpy.random.pcg64" sources building extension "numpy.random.sfc64" sources building extension "numpy.random.common" sources building extension "numpy.random.bit_generator" sources building extension "numpy.random.generator" sources building extension "numpy.random.bounded_integers" sources building extension "numpy.random.mtrand" sources building data_files sources build_src: building npy-pkg config files running build_py copying numpy/version.py -> build/lib.macosx-11.1-arm64-cpython-38/numpy copying build/src.macosx-11.1-arm64-3.8/numpy/__config__.py -> build/lib.macosx-11.1-arm64-cpython-38/numpy copying build/src.macosx-11.1-arm64-3.8/numpy/distutils/__config__.py -> build/lib.macosx-11.1-arm64-cpython-38/numpy/distutils running build_clib customize UnixCCompiler customize UnixCCompiler using build_clib running build_ext customize UnixCCompiler customize UnixCCompiler using build_ext building 'numpy.core._multiarray_umath' extension compiling C sources C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/zzz/opt/anaconda3/envs/mlops/include -arch arm64 -I/Users/zzz/opt/anaconda3/envs/mlops/include -arch arm64 compile options: '-DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=3 -DHAVE_CBLAS -Ibuild/src.macosx-11.1-arm64-3.8/numpy/core/src/umath -Ibuild/src.macosx-11.1-arm64-3.8/numpy/core/src/npymath -Ibuild/src.macosx-11.1-arm64-3.8/numpy/core/src/common -Inumpy/core/include -Ibuild/src.macosx-11.1-arm64-3.8/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/Users/zzz/opt/anaconda3/envs/mlops/include/python3.8 -Ibuild/src.macosx-11.1-arm64-3.8/numpy/core/src/common -Ibuild/src.macosx-11.1-arm64-3.8/numpy/core/src/npymath -Ibuild/src.macosx-11.1-arm64-3.8/numpy/core/src/common -Ibuild/src.macosx-11.1-arm64-3.8/numpy/core/src/npymath -c' extra options: '-faltivec -I/System/Library/Frameworks/vecLib.framework/Headers' gcc: numpy/core/src/multiarray/alloc.c gcc: numpy/core/src/multiarray/array_assign_scalar.c gcc: numpy/core/src/multiarray/buffer.c gcc: numpy/core/src/multiarray/common.c gcc: numpy/core/src/multiarray/conversion_utils.c gcc: numpy/core/src/multiarray/datetime_strings.cgcc: numpy/core/src/multiarray/descriptor.c gcc: build/src.macosx-11.1-arm64-3.8/numpy/core/src/multiarray/einsum.c clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly gcc: numpy/core/src/multiarray/hashdescr.c clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly gcc: numpy/core/src/multiarray/multiarraymodule.c clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly gcc: numpy/core/src/multiarray/nditer_constr.c gcc: build/src.macosx-11.1-arm64-3.8/numpy/core/src/multiarray/lowlevel_strided_loops.c clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly gcc: numpy/core/src/multiarray/refcount.c gcc: numpy/core/src/multiarray/scalarapi.c clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly gcc: numpy/core/src/multiarray/temp_elide.c clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly gcc: numpy/core/src/multiarray/vdot.c clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly gcc: build/src.macosx-11.1-arm64-3.8/numpy/core/src/umath/loops.c clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly gcc: numpy/core/src/umath/ufunc_object.c gcc: build/src.macosx-11.1-arm64-3.8/numpy/core/src/umath/scalarmath.c clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly gcc: numpy/core/src/common/npy_longdouble.c clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly gcc: numpy/core/src/npymath/npy_math.c gcc: numpy/core/src/npymath/halffloat.c clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly gcc: numpy/core/src/common/numpyos.c gcc: /private/var/folders/ls/wmc89mqx0b7bllgh90lmb40m0000gn/T/pip-install-hbwcqm_9/numpy_0b3ee84c8f8743d0b0ba121e58471df3/numpy/_build_utils/src/apple_sgemv_fix.c clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly error: Command "gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/zzz/opt/anaconda3/envs/mlops/include -arch arm64 -I/Users/zzz/opt/anaconda3/envs/mlops/include -arch arm64 -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=3 -DHAVE_CBLAS -Ibuild/src.macosx-11.1-arm64-3.8/numpy/core/src/umath -Ibuild/src.macosx-11.1-arm64-3.8/numpy/core/src/npymath -Ibuild/src.macosx-11.1-arm64-3.8/numpy/core/src/common -Inumpy/core/include -Ibuild/src.macosx-11.1-arm64-3.8/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/Users/zzz/opt/anaconda3/envs/mlops/include/python3.8 -Ibuild/src.macosx-11.1-arm64-3.8/numpy/core/src/common -Ibuild/src.macosx-11.1-arm64-3.8/numpy/core/src/npymath -Ibuild/src.macosx-11.1-arm64-3.8/numpy/core/src/common -Ibuild/src.macosx-11.1-arm64-3.8/numpy/core/src/npymath -c numpy/core/src/multiarray/alloc.c -o build/temp.macosx-11.1-arm64-cpython-38/numpy/core/src/multiarray/alloc.o -MMD -MF build/temp.macosx-11.1-arm64-cpython-38/numpy/core/src/multiarray/alloc.o.d -faltivec -I/System/Library/Frameworks/vecLib.framework/Headers" failed with exit status 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure × Encountered error while trying to install package. ╰─> numpy note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip.
asmaier commented 1 year ago

To install pyCaret on an M1 successfully I had to do the following:

brew install cmake
pipenv install --pre pyCaret

Installing cmake first is necessary, because otherwise the installation of lightgbm will fail, see https://lightgbm.readthedocs.io/en/latest/Installation-Guide.html#macos . For pyCaret I was only able to install the prerelease version successfully on an M1 Mac with Python 3.10.

ngupta23 commented 1 year ago

Thanks @asmaier.

@aidsj If this resolves the problem, please close this issue. Thanks!