How to fix: ERROR: Failed building wheel for pyarrow in docker?

554 Views Asked by At

My goal is to build a streamlit docker image.

According to: https://docs.streamlit.io/knowledge-base/tutorials/deploy/docker , I was stopped by an ERROR: Failed building wheel for pyarrow.

The cmake version is 3.23.1, and pip version is 23.3, and python version is 3.12. System version is debian 12.

The detail log:

CMake Error at CMakeLists.txt:261 (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!
      See also "/tmp/pip-install-_zye6u79/pyarrow_0db05df6220d482782ac885afa524b2a/build/temp.linux-x86_64-cpython-312/CMakeFiles/CMakeOutput.log".
      error: command '/usr/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: Could not build wheels for pyarrow, which is required to install pyproject.toml-based projects

Thanks for your help!

I tried to follow another doc: https://docs.streamlit.io/library/get-started/installation based on the official python image, but the error is exactly the same.


I also tried to install streamlit based on ubuntu 22 image, and it is working!

1

There are 1 best solutions below

0
On

pyarrow is currently compatible with python up to 3.11. Doc source. Try to downgrade your python version ?