在使用“pip install Streamlit”命令安装 Streamlit 期间,我遇到了与 CMake 和 PyArrow 相关的错误。该过程失败并出现以下错误消息:
-- Configuring incomplete, errors occurred!
error: command '/usr/local/bin/cmake' failed with exit code 1
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.
PyArrow 错误:
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
安装过程失败,并出现上述与“pyarrow”相关的 CMake 错误。 我尝试重新安装 CMake 和 pyarrow,但错误仍然存在。 我的python版本是3.10.0
pyarrow(streamlit 的依赖项和 Apache Arrow 的包装器)的安装失败,因为未安装 Apache Arrow。
按照 Python 开发 获取针对各种系统从源代码安装的说明。或者,如果您使用的是 macOS,则可以使用 Homebrew 来安装它:
brew install apache-arrow