问题 I'm writing software in Python3 (more specifically: Python 3.8.1 ). At some point, the software needs to check if some arbitrary executable is 64-bit or 32-bit. After some research, I found the following post: Checking if an exe is 32 bit or 64 bit In this post, the following solution is offered: subprocess.call(['dumpbin', '/HEADERS', 'test2.exe', '|', 'find', '"machine"']) Unfortunately, this doesn't work in Python 3.8.1 . That post is almost 8 years old and dates back to the Python 2.x