我的目标是构建一个精简的 docker 镜像。
根据:https://docs.streamlit.io/knowledge-base/tutorials/deploy/docker,我被一个错误阻止:为pyarrow构建轮子失败。
cmake版本为3.23.1,pip版本为23.3,python版本为3.12。系统版本是debian 12.
详细日志:
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
感谢您的帮助!
我尝试按照另一个文档:https://docs.streamlit.io/library/get-started/installation基于官方python图像,但错误完全相同。
我还尝试安装基于 ubuntu 22 映像的streamlit,并且它正在工作!
pyarrow
目前兼容Python 3.11。 文档来源。尝试降级你的Python版本?
截至 2024 年 11 月 6 日,
pyarrow
现已与 Python 版本 3.9、3.10、3.11、3.12 和 3.13 兼容。