[
https://issues.apache.org/jira/browse/ARROW-11151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17260060#comment-17260060
]
Kouhei Sutou commented on ARROW-11151:
--------------------------------------
The Apache Arrow formula in Homebrew should ensure using the Python installed
by Homebrew.
The following patch (CMake parameter name was changed because we switched to
use https://cmake.org/cmake/help/latest/module/FindPython3.html from
https://cmake.org/cmake/help/latest/module/FindPythonLibs.html) will solve this
case even when you have another installed Pythons:
{noformat}
diff --git a/Formula/apache-arrow.rb b/Formula/apache-arrow.rb
index 57d43652eb..d2f2a3a9cd 100644
--- a/Formula/apache-arrow.rb
+++ b/Formula/apache-arrow.rb
@@ -57,7 +57,7 @@ class ApacheArrow < Formula
-DARROW_WITH_SNAPPY=ON
-DARROW_WITH_BROTLI=ON
-DARROW_INSTALL_NAME_RPATH=OFF
- -DPYTHON_EXECUTABLE=#{Formula["[email protected]"].bin/"python3"}
+ -DPytnon3_EXECUTABLE=#{Formula["[email protected]"].bin/"python3"}
]
mkdir "build" do
{noformat}
Could you send a pull request to https://github.com/homebrew/homebrew-core ?
See also: https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request
> [Python][Packaging] Fix Homebrew Install Python 3 NumPy not found failure
> -------------------------------------------------------------------------
>
> Key: ARROW-11151
> URL: https://issues.apache.org/jira/browse/ARROW-11151
> Project: Apache Arrow
> Issue Type: Bug
> Components: Packaging, Python
> Reporter: Ian Cook
> Priority: Major
>
> {{brew install apache-arrow --HEAD}} fails when there is no existing
> installation of NumPy.
> {code:java}
> CMake Error at
> /usr/local/Cellar/cmake/3.19.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:218
> (message):
> Could NOT find Python3 (missing: Python3_NumPy_INCLUDE_DIRS NumPy) (found
> version "3.9.1")
> Call Stack (most recent call first):
>
> /usr/local/Cellar/cmake/3.19.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:582
> (_FPHSA_FAILURE_MESSAGE)
>
> /usr/local/Cellar/cmake/3.19.2/share/cmake/Modules/FindPython/Support.cmake:3148
> (find_package_handle_standard_args)
> /usr/local/Cellar/cmake/3.19.2/share/cmake/Modules/FindPython3.cmake:398
> (include)
> cmake_modules/FindPython3Alt.cmake:55 (find_package)
> src/arrow/python/CMakeLists.txt:22 (find_package)
> {code}
> Workaround is to first install NumPy with {{pip3 install numpy}}.
> Tested in macOS Big Sur 11.1 on an Intel Mac with
> {{python}} --> Python 2.7.16
> {{python3}} --> Python 3.9.1
--
This message was sent by Atlassian Jira
(v8.3.4#803005)