pythonpip64-bitz3angr

Why can't I install angr-z3 using pip on Windows when Python is 64-bit?


It says the module machine type doesn't match; why?
(Note: This is a self-answered question; see below.)


Solution

  • It's because setup.py needs to pass the -x flag to mk_make.py in order to build in 64-bit mode, but isn't doing so. You can solve this by downloading and extracting the package yourself, then changing line 28 in setup.py from

            if subprocess.call([sys.executable, os.path.join(build_dir,
                                                             'scripts',
                                                             'mk_make.py')],
    

    to

            if subprocess.call([sys.executable, os.path.join(build_dir,
                                                             'scripts',
                                                             'mk_make.py'), '-x'],