pytorch_arm_builds
pytorch_arm_builds copied to clipboard
PyTorch was compiled without NumPy support
-Installed torch-1.7.0a0-cp37-cp37m-linux_armv6l.whl on the raspberry pi zero. -Tried running the python code and received the error: "PyTorch was compiled without NumPy support".
Is there a version that supports NumPy? Thank you.
Yes, you just need to install NumPy independently. Something like sudo apt install python3-numpy
should do it
Is there a specific numpy version that work with torch-1.7.0? I have numpy 1.21.2 already installed, but I am still getting the reported error.
Looks like the issue is within the torch-1.7.0a0-cp37-cp37m-linux_armv6l.whl. My code does not even use the numpy, but the below torch code line is throwing the error.
Error: x = torch.from_numpy(x).to(p.device).type_as(p) / 255. # uint8 to fp16/32 RuntimeError: PyTorch was compiled without NumPy support
Hi, I am also experiencing this same problem on the Raspberry Pi Zero W when trying to run inference using yolov5. I have also installed the latest NumPy version, torch-1.7.0a0-cp37-cp37m-linux_armv6l.whl and torchvision-0.9.0a0+80f41f8-cp37-cp37m-linux_armv6l.whl.
However, I get an additional error if it helps:
- Error in cpuinfo: failed to parse file /sys/devices/system/cpu/kernel_max: "-1" is not an unsigned number
- img = torch.from_numpy(img).to(device) RuntimeError: PyTorch was compiled without NumPy support
I also think this may be an issue with torch-1.7.0a0-cp37-cp37m-linux_armv6l.whl where there is no NumPy support.
I read here : https://githubmemory.com/@Rumidom that the renaming the armv7l.whl to armv6l.whl and installing this one might be able to fix the issue (because armv7l comes with NumPy support). What are your thoughts on this as a temporary fix and do you think this could work on the Raspberry Pi Zero W?
Thanks in Advanced!
Exactly same problem as denisplakic described (also on RPi Zero W with same versions installed):
prediction=torch.from_numpy(prediction) RuntimeError: PyTorch was compiled without NumPy support
Thank you for a hint what can be done (e.g. renaming armv7l.whl)
same here...