Building wxPython in an unusual environment I discovered that MS link.exe uses the environment variable TMP for its temporary files. unusual environment: \ is not writable by current user os.env["TMP"] is not set result: link.exe fails: "\lnk2 does not exist" Solution: before calling link.exe, make sure TMP is set and points to a writable directory. This fix should probably go into distutils.