Код: Выделить всё
import subprocess
m = subprocess.run(['python', '--version'], capture_output=True, shell=True)
print("stdout:", m.stdout)
print("stderr:", m.stderr)
Код: Выделить всё
stdout: b'arm64'
stderr: b''
Код: Выделить всё
subprocess.run(['arch', '-x86_64', 'python', '--version'], capture_output=True, shell=True)
Подробнее здесь: https://stackoverflow.com/questions/798 ... acos-arm64