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
{{ message }}
[Python] Can't install on Raspberry Pi (Failed building wheel for pyarrow) #33814
changed the title [-]Can't install on Raspberry Pi (Failed building wheel for pyarrow)[/-][+][Python] Can't install on Raspberry Pi (Failed building wheel for pyarrow)[/+]on Jan 21, 2023
I did install cmake via pip (also tried to uninstall and install again)
.local/bin because I didn't run the install from the virtualenv this time, not sure why it's .local though, I'd have expected usr/bin but that's probably another story!
The error is the same anyways; that's why I didn't notice, sorry bout the confusion.
Here's the output from the same virtual env from before: out.txt
the information requested: (same for /home/pi/pyarrow-dev/bin/cmake)
$ file /home/pi/.local/bin/cmake /home/pi/.local/bin/cmake: Python script, ASCII text executable
$ head /home/pi/.local/bin/cmake
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from cmake import cmake
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(cmake())
Then tried to install pyarrow again and it worked!
I have no idea what I did honestly... it looks like pip can't work for a Pi installation. it requires the latest cmake from apt and for arrow to be compiled from the source. I have a limited understanding of that part, and still not sure why I still had to do a pip install on top of the build.
Let me know if I can help to resolve the vanilla pip install process for Raspberry, looks like a niche but it didn't work for me on 2 different setup so I guess it is really something that can be fixed. or I'm very unlucky
thank you again for your help, I can get back to my project! (and sleeping)
DESTDIR=/tmp/test/ make install is safer but it's not needed because your problem was solved. :-)
I think that documented command lines work well but there are many command lines. So some human errors can be injected like CMAKE_PREFIX_PATH.
If we provide pyarrow wheels for Raspberry Pi, you just need to run pip install pyarrow.
We provide pyarrow wheels for aarch64: https://pypi.org/project/pyarrow/#files
I don't know what architecture is required for Raspberry Pi.
hi @kou! I'm experiencing a new issue but note sure how related to the install it is so I dont want to create a new thread unless you tell me so.
I initially needed to install pyarrow because I couldn't install db-dtypes without it. Now I have both and it's confirmed if I try pip install db-dtypes
It looks like the issue is still with pyarrow though: import pyarrow.lib as _lib ImportError: libarrow_dataset.so.1100: cannot open shared object file: No such file or directory
the full error (worth mentioning the script works well on my laptop... maybe I should just consider not using a Pi for that project):
Traceback (most recent call last):
File "/home/pi/pyarrow-dev/lib/python3.7/site-packages/google/cloud/bigquery/_pandas_helpers.py", line 41, in <module>
import db_dtypes # type: ignore
File "/home/pi/pyarrow-dev/lib/python3.7/site-packages/db_dtypes/__init__.py", line 26, in <module>
import pyarrow
File "/home/pi/pyarrow-dev/lib/python3.7/site-packages/pyarrow/__init__.py", line 65, in <module>
import pyarrow.lib as _lib
ImportError: libarrow_dataset.so.1100: cannot open shared object file: No such file or directory
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "run_gscpull.py", line 5, in <module>
gscdatapull(backfill=5)#, end_date='2022-11-10')
File "/home/pi/gsc-bigquery/class_gscdailypull.py", line 22, in __init__
self.do_allthethings(all_users_settings,self.backfill)
File "/home/pi/gsc-bigquery/class_gscdailypull.py", line 58, in do_allthethings
mydata = GSC(domain=domain,wp_user_id=user_data['user_id'],backfill=backfill, refresh=user_data['refresh_token'], end_date=self.end_date)
File "/home/pi/gsc-bigquery/class_gsc.py", line 47, in __init__
self.db_dates_data = bigquery.checkdata(self.start_date, self.end_date).to_dataframe()
File "/home/pi/pyarrow-dev/lib/python3.7/site-packages/google/cloud/bigquery/table.py", line 1993, in to_dataframe
_pandas_helpers.verify_pandas_imports()
File "/home/pi/pyarrow-dev/lib/python3.7/site-packages/google/cloud/bigquery/_pandas_helpers.py", line 1006, in verify_pandas_imports
raise ValueError(_NO_DB_TYPES_ERROR) from db_dtypes_import_exception
ValueError: Please install the 'db-dtypes' package to use this function.
cmake --preset=ninja-release-python . stopped somewhere in the middle of sudo cmake --build . --target install
so I just tried to add dataset=on to the ninja-release-python-minimal preset (see below), the install works but I have the same error when running my script. cmake -DARROW_BUILD_STATIC=OFF -DARROW_COMPUTE=ON -DARROW_CSV=ON -DARROW_FILESYSTEM=ON -DARROW_JSON=ON -DARROW_DATASET=ON -DCMAKE_BUILD_TYPE=Release
trying cmake --preset=ninja-release-python . again, will report the error
Hi @vmalisz and @kou, I am running into the same errors that you described above. Would you be able to summarize the list of commands that you entered to get pyarrow to run? I'm having trouble discerning which steps were necessary and which ones caused more issues. Thank you in advance!
Activity
[-]Can't install on Raspberry Pi (Failed building wheel for pyarrow)[/-][+][Python] Can't install on Raspberry Pi (Failed building wheel for pyarrow)[/+]kou commentedon Jan 21, 2023
It seems that you didn't define
CMAKE_PREFIX_PATH:https://arrow.apache.org/docs/dev/developers/python.html#using-system-and-bundled-dependencies
vmalisz commentedon Jan 21, 2023
thank you for your quick answer. I have another error now: No module named 'cmake' (output:
pyarrow-installout.txt
It is installed already and I double-checked 'import cmake' in a Python terminal it worked.
edit: it was the wrong output file
vmalisz commentedon Jan 21, 2023
I realized I didn't have the last version for pip, I just upgraded to pip 22.3.1 but it didn't change the result
westonpace commentedon Jan 21, 2023
When you tried
import cmakein the terminal were you using this python executable?/home/pi/pyarrow-dev/bin/python3vmalisz commentedon Jan 21, 2023
'which python3' gives me that path yes
/home/pi/pyarrow-dev/bin/python3
kou commentedon Jan 21, 2023
What is
/home/pi/.local/bin/cmake?Could you show
file /home/pi/.local/bin/cmakeandhead /home/pi/.local/bin/cmake?How did you install CMake?
pip install cmake? ( https://pypi.org/project/cmake/ ?)vmalisz commentedon Jan 21, 2023
I did install cmake via pip (also tried to uninstall and install again)
.local/bin because I didn't run the install from the virtualenv this time, not sure why it's .local though, I'd have expected usr/bin but that's probably another story!
The error is the same anyways; that's why I didn't notice, sorry bout the confusion.
Here's the output from the same virtual env from before:
out.txt
the information requested: (same for /home/pi/pyarrow-dev/bin/cmake)
$ file /home/pi/.local/bin/cmake
/home/pi/.local/bin/cmake: Python script, ASCII text executable$ head /home/pi/.local/bin/cmake
kou commentedon Jan 22, 2023
OK. Could you show
head /home/pi/pyarrow-dev/bin/cmake?I think the shebang of the file is wrong. It must be
#!/home/pi/pyarrow-dev/bin/python3.vmalisz commentedon Jan 22, 2023
it looks good
$ head /home/pi/pyarrow-dev/bin/cmake
kou commentedon Jan 22, 2023
Does
/home/pi/pyarrow-dev/bin/cmake --helpwork?vmalisz commentedon Jan 22, 2023
it does
kou commentedon Jan 22, 2023
Could you use CMake installed by
aptnotpipor trypip install --no-build-isolation pyarrow?4 remaining items
vmalisz commentedon Jan 22, 2023
I followed exactly the instructions here: https://arrow.apache.org/docs/dev/developers/python.html#using-system-and-bundled-dependencies
(forgot that part below initially)
the error happened here at 'make install'
trying again with https://arrow.apache.org/docs/dev/developers/cpp/building.html#cpp-building-building
$ cmake .. --preset ninja-debug-minimalworkedthat part is a bit over my head, and I'm not sure where to go from there. Thanks again for your help!
kou commentedon Jan 22, 2023
It seems that
export ARROW_HOME=...is missing.Could you show
echo $CMAKE_PREFIX_PATH?Could you also show
make installoutput?vmalisz commentedon Jan 22, 2023
just ran
without errors.
Then tried to install pyarrow again and it worked!
I have no idea what I did honestly... it looks like pip can't work for a Pi installation. it requires the latest cmake from apt and for arrow to be compiled from the source. I have a limited understanding of that part, and still not sure why I still had to do a pip install on top of the build.
I don't know if I can run again
make installnow it works? (really afraid to break something...)vmalisz commentedon Jan 22, 2023
Let me know if I can help to resolve the vanilla pip install process for Raspberry, looks like a niche but it didn't work for me on 2 different setup so I guess it is really something that can be fixed. or I'm very unlucky
thank you again for your help, I can get back to my project! (and sleeping)
kou commentedon Jan 24, 2023
DESTDIR=/tmp/test/ make installis safer but it's not needed because your problem was solved. :-)I think that documented command lines work well but there are many command lines. So some human errors can be injected like
CMAKE_PREFIX_PATH.If we provide pyarrow wheels for Raspberry Pi, you just need to run
pip install pyarrow.We provide pyarrow wheels for aarch64: https://pypi.org/project/pyarrow/#files
I don't know what architecture is required for Raspberry Pi.
BTW, can we close this issue?
vmalisz commentedon Jan 24, 2023
yes, I just did. Thank you again for your help!
vmalisz commentedon Jan 25, 2023
hi @kou! I'm experiencing a new issue but note sure how related to the install it is so I dont want to create a new thread unless you tell me so.
I initially needed to install pyarrow because I couldn't install db-dtypes without it. Now I have both and it's confirmed if I try
pip install db-dtypesIt looks like the issue is still with pyarrow though:
import pyarrow.lib as _lib ImportError: libarrow_dataset.so.1100: cannot open shared object file: No such file or directorythe full error (worth mentioning the script works well on my laptop... maybe I should just consider not using a Pi for that project):
kou commentedon Jan 26, 2023
You need to use
ninja-release-pythonorninja-release-python-maximumpreset to usepyarrow.dataset:vmalisz commentedon Jan 26, 2023
cmake --preset=ninja-release-python .stopped somewhere in the middle ofsudo cmake --build . --target installso I just tried to add dataset=on to the ninja-release-python-minimal preset (see below), the install works but I have the same error when running my script.
cmake -DARROW_BUILD_STATIC=OFF -DARROW_COMPUTE=ON -DARROW_CSV=ON -DARROW_FILESYSTEM=ON -DARROW_JSON=ON -DARROW_DATASET=ON -DCMAKE_BUILD_TYPE=Releasetrying
cmake --preset=ninja-release-python .again, will report the errorvmalisz commentedon Jan 26, 2023
it worked this time. no error but the script still fails
here's the output for
sudo cmake --build . --target installinstall.txt
looks like the library is installed
I tried adding /usr/local/lib to the $LD_LIBRARY_PATH but didn't work either.
vmalisz commentedon Jan 26, 2023
ok that was most likely the LD_LIBRARY_PATH, I ran a
sudo ldconfigand now it works. THANK YOU for your help and patience (I learned a lot!)kou commentedon Jan 26, 2023
No problem. :-)
bdod92 commentedon Apr 27, 2023
Hi @vmalisz and @kou, I am running into the same errors that you described above. Would you be able to summarize the list of commands that you entered to get pyarrow to run? I'm having trouble discerning which steps were necessary and which ones caused more issues. Thank you in advance!
kou commentedon May 1, 2023
What is your platform?
In general, https://arrow.apache.org/docs/dev/developers/python.html#building-on-linux-and-macos should work.
If it doesn't work, we should update our documentations.