Why does subproces not work in macos arm64
12:12 25 Dec 2025
import subprocess

m = subprocess.run(['python', '--version'], capture_output=True, shell=True)
print("stdout:", m.stdout)
print("stderr:", m.stderr)

The easiest code also did not work. The outputs are

stdout: b'arm64'
stderr: b''

I have tried

subprocess.run(['arch', '-x86_64', 'python', '--version'], capture_output=True, shell=True)

That did not work too. So it is not arm's problem?

python macos subprocess