apache / arrow

Apache Arrow is the universal columnar format and multi-language toolbox for fast data interchange and in-memory analytics
https://arrow.apache.org/
Apache License 2.0
14.53k stars 3.54k forks source link

[Python] issue while installing streamlit in mac #43235

Open Shryaaa opened 3 months ago

Shryaaa commented 3 months ago

Describe the bug, including details regarding any error messages, version, and platform.

 CMake Error at CMakeLists.txt:271 (find_package):
        By not providing "FindArrow.cmake" in CMAKE_MODULE_PATH this project has
        asked CMake to find a package configuration file provided by "Arrow", but
        CMake did not find one.

        Could not find a package configuration file provided by "Arrow" with any of
        the following names:

          ArrowConfig.cmake
          arrow-config.cmake

        Add the installation prefix of "Arrow" to CMAKE_PREFIX_PATH or set
        "Arrow_DIR" to a directory containing one of the above files.  If "Arrow"
        provides a separate development package or SDK, be sure it has been
        installed.

      -- Configuring incomplete, errors occurred!
      error: command '/usr/local/bin/cmake' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyarrow
Failed to build pyarrow
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyarrow)
kiran-raskars-MacBook-Pro:~ macbookpro$ 

Component(s)

Python

raulcd commented 3 months ago

Thanks for reporting. Could you share what version of Mac are you using and whether is Intel or ARM? How is pyarrow being installed?

Shryaaa commented 3 months ago

Hi actually I am using quiet an older version macbook 10.13 and Intel processor

On Fri, 12 Jul 2024, 10:09 pm Raúl Cumplido, @.***> wrote:

Thanks for reporting. Could you share what version of Mac are you using and whether is Intel or ARM? How is pyarrow being installed?

— Reply to this email directly, view it on GitHub https://github.com/apache/arrow/issues/43235#issuecomment-2225941494, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXZRNPV2CWY2CUCQ4K3YBIDZMABDFAVCNFSM6AAAAABKZGUT6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRVHE2DCNBZGQ . You are receiving this because you authored the thread.Message ID: @.***>

kou commented 3 months ago

If you're using Homebrew, could you try install apache-arrow by Homebrew before you install pyarrow?

StefanLobbenmeierObjego commented 2 months ago

Had the same error with macOS 14.6.1 (23G93) on Apple M1

Installing pyarrow via homebrew resolved that error, but the build still failed with

      [72/151] Compiling C object pandas/_libs/pandas_datetime.cpython-312-darwin.so.p/src_vendored_numpy_datetime_np_datetime.c.o
      FAILED: pandas/_libs/pandas_datetime.cpython-312-darwin.so.p/src_vendored_numpy_datetime_np_datetime.c.o
      cc -Ipandas/_libs/pandas_datetime.cpython-312-darwin.so.p -Ipandas/_libs -I../../pandas/_libs -I../../../../pip-build-env-un8ydyqn/overlay/lib/python3.12/site-packages/numpy/_core/include -I../../pandas/_libs/include -I/opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12 -fvisibility=hidden -fcolor-diagnostics -DNDEBUG -Wall -Winvalid-pch -std=c99 -O3 -DNPY_NO_DEPRECATED_API=0 -DNPY_TARGET_VERSION=NPY_1_21_API_VERSION -MD -MQ pandas/_libs/pandas_datetime.cpython-312-darwin.so.p/src_vendored_numpy_datetime_np_datetime.c.o -MF pandas/_libs/pandas_datetime.cpython-312-darwin.so.p/src_vendored_numpy_datetime_np_datetime.c.o.d -o pandas/_libs/pandas_datetime.cpython-312-darwin.so.p/src_vendored_numpy_datetime_np_datetime.c.o -c ../../pandas/_libs/src/vendored/numpy/datetime/np_datetime.c
      ../../pandas/_libs/src/vendored/numpy/datetime/np_datetime.c:946:54: error: no member named 'c_metadata' in 'struct _PyArray_Descr'
          return (((PyArray_DatetimeDTypeMetaData *)dtype->c_metadata)->meta);
                                                    ~~~~~  ^
      1 error generated.

I suspect it still needs to be exactly the same version in brew and pip or something like that (brew installed latest apache-arrow @17.0.0_2, but in my pip I still use pyarrow==13.0.0 because it is not my project). Unfortunately installing older versions of something with brew is not that easy.