3

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.

Milliways
  • 62,573
  • 32
  • 113
  • 225
user155849
  • 31
  • 2

1 Answers1

4

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.

goldilocks
  • 60,325
  • 17
  • 117
  • 234