I enabled the aarch64 kernel with arm_64bit=1 in /boot/config.txt on Raspbian.
After that I tried to upgrade python to its 64-bit version.
Fist with "apt upgrade" then with building python from source, but with the command python3 -c 'import platform; print(platform.architecture())' I still get the output that my version is 32-bit.
Has anyone an idea how to do it properly?


It is not just the kernel which determines what software you can run. Applications such as python depend upon certain system libraries and facilities. Those are part of the OS userland -- everything that isn't the kernel -- which for Raspbian/RpiOS also comes in two flavours, 32 and 64 bit.

The 64-bit version is still considered "beta" and you may have problems with things like the camera, but that is what you will have to install if you want 64-bit python.

  • Thanks for your fast response! If I get it right you say, that it's not possible to install a 64-bit programm on RpiOS 32-bit version even if the kernel has been upgraded to aarch64? So the only solution would be to download a fresh 64-bit image of RpiOS.
    – user135645
    Jul 18 at 14:20
  • Yes. It probably isn't worthwhile unless you have some specific reason to need 64-bit python. I doubt the general performance will be significantly better.
    – goldilocks
    Jul 18 at 14:40
  • You would only see a benefit if you are using the 8GB Raspberry Pi 4. Since your software would have more available RAM. Programs wouldn't necessarily run faster on a 64-bit OS. They might even run slightly slower. Jul 19 at 3:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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