You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the usage question you have. Please include as many useful details as possible.
Dear Arrow
When I try to install pyarrow on my Raspberry PI 3 using pip I get this error
CMake Error at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Python3 (missing: Python3_NumPy_INCLUDE_DIRS NumPy) (found
suitable version "3.9.2", minimum required is "3.7")
Call Stack (most recent call first):
/usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake-3.25/Modules/FindPython/Support.cmake:3245 (find_package_handle_standard_args)
/usr/local/share/cmake-3.25/Modules/FindPython3.cmake:490 (include)
/tmp/pip-install-h0q930xi/pyarrow_e68ff656d2a84a388a1cc31acfc338a9/cmake_modules/FindPython3Alt.cmake:60 (find_package)
Full output attached. I didn't know where to ask or if it should be a bug report instead. So I start here.
System is "Raspbian GNU/Linux 11 (bullseye) on Raspberry PI 3 armhf.
I tried both with numpy installed from apt and pip, and cmake install from apt and latest build from source.
Same error message.
Please let me know if I should provide info or how I can help you help me.
My main objective is to install streamlit which has a dependency to pyarrow via pip.
Thanks kou
I played around with messages you suggested and found something that could be the issue.
I attached a little cmake toy example and I was able to reproduce an error on both my Ubuntu/22.04 LTS (cmake 3.22.1)
as well as my Raspberry PI described above.
_Python3_NumPy_PATH is empty when pyarrow installer runs. _Python3_NumPy_PATH = /usr/lib/python3/dist-packages/numpy/core/include when I run the toy example.
I'll try to put more message output and share here.
Do you have suggestions to something specific you wanna see?
Then find_package(Python3... ran with the success. _Python3_NumPy_PATH = /tmp/pip-build-env-rlrroqfr/overlay/lib/python3.9/site-packages/numpy/core/include
Btw, I also installed arrow from source apache-arrow-10.0.1/cpp
cmake -> make -> sudo make install
Prior to all this, otherwise I got this error
CMake Error at CMakeLists.txt:63 (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.
Thanks. My bad. I wiped and re-unpacked arrow source code and the above cmake commands completed with success.
(I also went back to use cmake 3.18 installed with apt).
Now I get this error when I try to install pyarrow with pip:
-- Build files have been written to: /tmp/pip-install-lmhsbdp3/pyarrow_0897d7658651493cb858488552932daa/build/cpp
-- Finished CMake for PyArrow C++
-- Running CMake build and install for PyArrow C++
cmake --build . --config release --target install
Scanning dependencies of target arrow_python_objlib
[ 4%] Building CXX object CMakeFiles/arrow_python_objlib.dir/arrow/python/arrow_to_pandas.cc.o
/tmp/pip-install-lmhsbdp3/pyarrow_0897d7658651493cb858488552932daa/pyarrow/src/arrow/python/arrow_to_pandas.cc:49:10: fatal error: arrow/compute/api.h: No such file or directory
49 | #include "arrow/compute/api.h"
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/arrow_python_objlib.dir/build.make:82: CMakeFiles/arrow_python_objlib.dir/arrow/python/arrow_to_pandas.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:174: CMakeFiles/arrow_python_objlib.dir/all] Error 2
gmake: *** [Makefile:149: all] Error 2
error: command '/usr/bin/cmake' failed with exit code 2
----------------------------------------
ERROR: Failed building wheel for pyarrow
Failed to build pyarrow
ERROR: Could not build wheels for pyarrow which use PEP 517 and cannot be installed directly
I think that's ok. MATCHES should still match true if the pattern is a substring in the variable. Perhaps the issue is that this only applies to static builds? @kou might know more here.
Activity
kou commentedon Dec 12, 2022
Could you show the output of
/usr/bin/python3 -c 'import numpy; print(numpy.get_include())'?sdy72 commentedon Dec 13, 2022
Sure:
pi@raspberrypi:~ $ /usr/bin/python3 -c 'import numpy; print(numpy.get_include())'/usr/lib/python3/dist-packages/numpy/core/includeThere are 26 .h files in
/usr/lib/python3/dist-packages/numpy/core/include/numpy/kou commentedon Dec 16, 2022
Hmm. there is no problem for it...
Can you add debug prints (
message("...")) to /usr/local/share/cmake-3.25/Modules/FindPython/Support.cmake (line 3145-3226) https://gitlab.kitware.com/cmake/cmake/-/blob/v3.25.1/Modules/FindPython/Support.cmake#L3154-3226 ?sdy72 commentedon Dec 19, 2022
Thanks kou
I played around with messages you suggested and found something that could be the issue.
I attached a little cmake toy example and I was able to reproduce an error on both my Ubuntu/22.04 LTS (cmake 3.22.1)
as well as my Raspberry PI described above.
I looked at this:
arrow/cpp/cmake_modules/FindPython3Alt.cmake
Line 60 in 16d40c8
It makes a difference whether you put this
find_package(Python3 ...or
find_package(Python ...Please check this toy example:
CMakeLists.txt
kou commentedon Dec 20, 2022
Thanks! Could you show the output of the following
CMakeLists.txt?sdy72 commentedon Dec 20, 2022
My bad. That works both places.
Another observation:
After https://gitlab.kitware.com/cmake/cmake/-/blob/v3.25.1/Modules/FindPython/Support.cmake
lines 3170-3176
_Python3_NumPy_PATHis empty when pyarrow installer runs._Python3_NumPy_PATH = /usr/lib/python3/dist-packages/numpy/core/includewhen I run the toy example.I'll try to put more message output and share here.
Do you have suggestions to something specific you wanna see?
sdy72 commentedon Dec 20, 2022
New finding. I removed the try: ... except: pass in
https://gitlab.kitware.com/cmake/cmake/-/blob/v3.25.1/Modules/FindPython/Support.cmake#L3172
and got this error:
I then followed the recommendation in https://numpy.org/devdocs/user/troubleshooting-importerror.html
and installed
sudo apt-get install libatlas-base-devThen find_package(Python3... ran with the success.
_Python3_NumPy_PATH = /tmp/pip-build-env-rlrroqfr/overlay/lib/python3.9/site-packages/numpy/core/includeNow I get the following error instead. Attached output.
pyarrow_install_make_error.txt
Btw, I also installed arrow from source apache-arrow-10.0.1/cpp
cmake -> make -> sudo make install
Prior to all this, otherwise I got this error
Is this intended?
kou commentedon Dec 20, 2022
Great!
Could you show the
cmakecommand line used for Apache Arrow C++?sdy72 commentedon Dec 20, 2022
cmake .install_manifest.txt
kou commentedon Dec 20, 2022
OK. We need to specify some options to enable Apache Arrow C++ components that are used by pyarrow.
Could you try the following?
See also: https://arrow.apache.org/docs/dev/developers/python.html#build-and-test
sdy72 commentedon Dec 26, 2022
Thanks.
I also got some hints about dependencies here:
https://gist.github.com/renjieliu/b86f14e648cac7ddf582cb6ceb164d32
I had to fetch xsimd source manually and set this prior to the cmake commands:
But I could not get rid of this error:
kou commentedon Dec 26, 2022
Could you share the output of
ls -la /home/pi/arrow/apache-arrow-10.0.1/cpp/jemalloc_ep-prefix/src/jemalloc_ep-stamp/?sdy72 commentedon Dec 27, 2022
Thanks. My bad. I wiped and re-unpacked arrow source code and the above cmake commands completed with success.
(I also went back to use cmake 3.18 installed with apt).
Now I get this error when I try to install pyarrow with pip:
kou commentedon Dec 27, 2022
Could you the show full output of
pip install pyarrow?9 remaining items
westonpace commentedon Jan 4, 2023
Yes, arrow will need to be linked with
-latomic. However, that should be happening here:arrow/cpp/src/arrow/CMakeLists.txt
Lines 577 to 581 in a0d1630
Is there any reason this check might not be working?
sdy72 commentedon Jan 4, 2023
Could it be this?
message(STATUS "#### CMAKE_SYSTEM_PROCESSOR = ${CMAKE_SYSTEM_PROCESSOR} ")outputs:
#### CMAKE_SYSTEM_PROCESSOR = armv7lwestonpace commentedon Jan 4, 2023
I think that's ok.
MATCHESshould still match true if the pattern is a substring in the variable. Perhaps the issue is that this only applies to static builds? @kou might know more here.kou commentedon Jan 4, 2023
Ah, we need to add
-latomicto our CMake package because PyArrow uses CMake package not pkg-config package. Could you try the following patch?sdy72 commentedon Jan 7, 2023
It works now all the way. Thank you kou.
apacheGH-14920: [C++][CMake] Add missing -latomic to Arrow CMake package
kou commentedon Jan 8, 2023
Thanks for confirming it.
I've opened a pull request: #15251
GH-14920: [C++][CMake] Add missing -latomic to Arrow CMake package (#…
apacheGH-14920: [C++][CMake] Add missing -latomic to Arrow CMake pack…