1

I'm trying to use Raspberry Pi for a voice recognition project.

I have Raspberry Pi 4 model B.

I was having issue downloading PyTorch with the error of "Could not find a version that satisfies the requirement torch." And I read in another place saying it might be mismatch of bit version. I used Raspberry Pi Imager to reformat my SD card to FAT32 and then downloaded the 32 bit version of Raspberry Pi OS.

When I check using "uname -m", it shows aarch64 When I check "python -c "import struct;print(8*struct.calcsize('P'))" it shows 32

I'm not sure why it's showing aarch64 when I selected 32bit version. I been having a lot of issue just trying to configure the system so I can download and use the OpenAI Whisper.

2
  • Add arm_64bit=0 to /boot/config.txt and reboot. Your RPi will come up with the 32-bit kernel.
    – Dougie
    Jul 20 at 20:58
  • In this context it does not matter which kernel is used, the rest of the system software is still 32-bit and that is what counts WRT linking and using other software.
    – goldilocks
    Jul 20 at 21:49

1 Answer 1

3

To elaborate a bit on Dougie's comment:

Add arm_64bit=0 to /boot/config.txt and reboot. Your RPi will come up with the 32-bit kernel.

What uname -m reports is the ISA of the kernel, not the userland (= everything else). A 64-bit kernel can run a 32-bit userland (but not vice versa). If you want to find out what the system binaries are, use file ..., eg. file $(which bash). On the 32-bit OS regardless of what kernel is running, you should get:

/bin/bash: ELF 32-bit LSB executable, ARM, EABI5 version 1 

By default, if a 64-bit kernel is available on a 64-bit Pi it will be used. Note that if the issue is software compatibility, it's the userland that counts, so you should not have to use a 32-bit kernel, and (put another way), if what you want to do still does not work, using a 32-bit kernel won't change that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.