-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can't install llvmlite on raspberry pi 4 #604
Comments
See this line:
Ubuntu does not provide a default
|
@Firemanpl following up, did the suggestion from @pwuertz help at all? @pwuertz thanks for making that suggestion. |
I'm using Numba on the Raspi4 too by the way, works like a charm. |
Is LLVM_CONFIG supposed to be an environment variable? Setting it doesn't seem to inform the pip3 process (at whatever step it matters). |
@dails08 Yes, it's an ENV variable read by the setup.py build step (see the command line above for a working example). Never used pip for building Numba though. Does pip execute builds in an isolated ENV? If you want pip to manage the module, you could use |
A closer look at my error suggests I have a non-arm version of llvm-config:
I'll redo the installation with a closer eye and see where my misstep is. This is a different issue than op, so if I can't figure it out on the retry, I'll open another issue. Thanks! |
Oh, looks like this is covered by #314 |
FWIW, on an RPi4 with Raspbian Buster, the following worked for me to install llvmlite: |
@JanLahmann thanks for providing this suggestion. I recently got some more time to look into the build system for llvmlite and get some more experience on how to install on RasPi 4. While the suggestion to use a distribution based LLVM (installing with https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#compiling-llvm I should also note, that we do provide pre-compiled binaries of the I will now close this issue, since I believe it has been largely resolved. Should you encounter any similar snags in future, please don't hesitate to open a new issue! Best wishes and thanks for using Numba! |
I was trying to install librosa on my RPi 4+ and found the following: After many paths tried, I finally was able to install on Raspberry Pi 4+. It was necessary, I think, to install LLVM even though llvmlite says not -- to do that required 'sudo apt-get install llvm-9*' since the default is 7.0 and llvmlite requires 9 or 10. Then, to install llvmlite required adding an environment variable as in 'LLVM_CONFIG=llvm-config-9 pip3 install llvmlite' and then 'LLVM_CONFIG=llvm-config-9 pip3 install librosa' . |
@joem5636 interesting. I am curious, is it possible to run the librosa test suite to ensure that librosa does indeed function correctly? |
I didn't find the test suite. I'm running the examples and for the
plot_chroma example I get no output and the (apparently erroneous as I have
version 4.4 of colorama) message:
/home/pi/.local/lib/python3.7/site-packages/numba/core/errors.py:154:
UserWarning: Insufficiently recent colorama version found. Numba requires
colorama >= 0.3.9
warnings.warn(msg)
plot_display, same warning; also no output but seems to have run and
downloaded two songs.
plot_hprss -- same warning, no output
I looked at generating the tests, but needing MATLAB and a bunch of other
things was just too much.
…On Fri, Jan 22, 2021 at 4:25 PM esc ***@***.***> wrote:
@joem5636 <https://github.com/joem5636> interesting. I am curious, is it
possible to run the librosa test suite to ensure that librosa does indeed
function correctly?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#604 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AASZUVQUC6DZAVV5ZJFXCVDS3HUNJANCNFSM4OP45XMQ>
.
--
Best regards,
Joe
|
@joem5636 OK, thanks for following up. Just to clarify, you do expect output from the code you ran? |
I was able to run several examples and wrote my own pitch_switch.py one
after the time one. I do get a warning about PyAudio for some reason.
…On Tue, Jan 26, 2021, 11:44 AM esc ***@***.***> wrote:
@joem5636 <https://github.com/joem5636> OK, thanks for following up. Just
to clarify, you do expect output from the code you ran?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#604 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AASZUVTGY4SIVDSB2QXBWQ3S33WNNANCNFSM4OP45XMQ>
.
|
Dear @JanLahmann
The output message is:
|
Hi @pifparfait , unfortunately I have no experience with the 64bit OS in Raspberry Pi. |
I have already tried with pip3 but without success.
On Mon, 19 Apr 2021 at 22:26, JanLahmann ***@***.***> wrote:
Hi @pifparfait <https://github.com/pifparfait> , unfortunately I have no
experience with the 64bit OS in Raspberry Pi.
Maybe the issue is that it should read pip3 instead of pip in the
following command:
LLVM_CONFIG=llvm-config-9 pip3 install llvmlite
(at the time of posting the above workaround, we were using a virtualenv
on RasQberry, for which pip was correct. But that has changed since then.)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#604 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGKQN3ZKCBLN5NHYJ3ZIT23TJSGY3ANCNFSM4OP45XMQ>
.
--
*Parfait Atchadé*
*Tel Spain: 0034661205543*
*Tel Deutsch: 00491706659017*
|
For some reason the system is trying to build and install llvmlite. |
Side note: Ubuntu 21.04 for ARM64 / Raspi has |
Additional side note: using system provided LLVM packages isn't recommended and you can read more about this here: https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#what-to-be-aware-of-when-using-a-system-provided-llvm-package -- |
@pwuertz what you mean by that? I understood from @esc that pip installation of binary wheels on aarch64 isn't supported yet. Only use conda as a workaround until #665 is completed. But for what I'm doing I guess I can't use it. |
@JanLahmann you are right, pip is not installing the package. @esc posted that to me. And suggested to me to use conda, but what I heard, is that for your work Rasqberry, you discouraged using conda. Don't you?. Nevertheless here you have the output message: pi@raspberrypi:~/rasqberry/libcint/build $ LLVM_CONFIG=llvm-config-9 pip3 install llvmlite |
Hi @pifparfait , I'm not sure why it complains about missing llvmlite, although llvmlite seems to be installed. |
Hi @JanLahmann, I provide you with the requested information. What I have not been able to install is qiskit-machine-learning because it gives me the shared error. When it appears, I think it tries to install llvmlite-0.36 and does not succeed, so it breaks the installation. pi@raspberrypi:~/rasqberry/libcint/build $ python3 -m pip listPackage Version absl-py 0.12.0 And outdated: pi@raspberrypi:~/rasqberry/libcint/build $ python3 -m pip list --outdated asn1crypto 0.24.0 1.4.0 wheel
|
To solve this issue: I installed LLVM 11 because the llvm was not configured to the right path ("RuntimeError: Building llvmlite requires LLVM 11.x.x, got '9.0.1'. Be sure to set LLVM_CONFIG to the right executable path.") -- This is the Error I got. Solution: Result I got: "Successfully installed librosa-0.9.2 llvmlite-0.39.0 numba-0.56.0 resampy-0.3.1" Hope this helps |
Question: llvmlite now has pre-compiled, binary wheels for linux-aarch64, which is Raspberry-PI. What was the reason for not using these and compiling from source? |
This is the answer i been looking for, Thank you sir or madam!! |
May I ask, did you not have any luck withe the binary wheels for llvmlite on PyPi? |
I downloaded the *.whl and tried to run it without any luck. |
Oh interesting. Was there no |
Thx @FardowsaRoble, you save my life ! I tried to install conda to install llvmlite but I was missing too many packages.
I have the impression that your solution is so simple, that it should necessarily appear in the documentation of Numba. Anyway thank you very much. |
@florianwns @FardowsaRoble thank your for commenting on this. I would like to re-iterate that the llvmlite developers don't advocate for using system provided LLVM packages. Read more about it here: It would be nice if someone with a RaspberryPi 4 could provide feedback (error logs of installation attempts) as to why the binary wheels for this platform that we do provide on PyPi don't work. They really should and no-one should encounter issues when installing llvmlite. If any of you have a spare minute that feedback would be most appreciated so that we can solve this issue properly and no longer need to rely on "hacks". |
My guess about the issues that people using https://pypi.org/project/llvmlite/0.39.1/#files And the wheels for the RPi4 (which are |
@esc (1) Raspberry Pi 4 Model B:
(2) Raspberry Pi Zero:
|
@snio89 thank you for your response, it was very helpful.
Thank you for confirming the above, this means 64 bit linux wheels can indeed be installed on a RPi! 🎉
This points at the issue being related to 32-bit linux wheels. From what I can tell the description at https://realpython.com/python-wheels/ suggests |
So, researching some more here, the |
The Raspberry Pi Zero is 32-bit ARM, not 32-bit x86 - did we do wheels for 32-bit ARM? edit: Never mind, you beat me to it @esc :-) |
@gmarkall ok, yes, that would make sense then. No 32-bit ARM support. Thank you for confirming! @snio89 perhaps it is possible to install a 64 bit OS on the Raspberry Pi Zero? Looking at: https://en.wikipedia.org/wiki/Raspberry_Pi The following suggests you need a |
@esc I am sorry but I don't have RPi Zero 2 now. If I can test the following things tomorrow, though I am not sure these tests will be helpful.
|
@snio89 I think the lack of 32-bit ARM manylinux wheels is indeed the case of your issue. I am not sure what to recommend now. All other options have their own risks or are tricky. a) Compile LLVM from source -- this is quite tricky to get right, since Numba/llvmlite requires a patched LLVM Some folks above have recommended and posted instructions for b) using the
|
@snio89 you could also see if |
@esc Thanks for the help. I had checked the solution of @FardowsaRoble and it seemed possible to install |
This is just a suggestion: how about mentioning the current situation with the 32bit ARM and I also faced a similar problem for the It would be very helpful for Raspberry Pi users if the |
Probably not a bad idea. I had previously assumed this was a niche use-case, however it seems like there is quite some demand, judging from the opened issues on the llvmlite issue-tracker. |
If anyone is interested: I managed to install numba 0.56.4 on a raspberry pi zero 2 w. However, I had to use some workarounds, here is how i did it:
At this point I faced the issue, that the installer froze builing a wheel for llvmlite. ChatGPT helped by recommending to increase the SWAP size in
I really hope it helps someone. I took me quite some time to figure this out... |
Thank you for adding this! It's always good to hear about someones experience. I will ask for some clarification in-line.
Which version of
Did you mean
Why not use the latest release?
The
Yeah, installation on 32 bit RPis is currently a daunting task that requires a lot of manual cranking. |
Hi! Thank you for your feedback. I fixed the typos in my above comment.
I then tried to figure out how to update llvm. However, since I am quite new to programming and linux, i decided to give up... |
Update:
|
The text was updated successfully, but these errors were encountered: