On a Windows XP virtual machine with BitNami DjangoStack 1.3 installed, virtualenv fails at the "Testing executable" step:
cmd = [py_executable, '-c', 'import sys;out=sys.stdout;'
'getattr(out, "buffer", out).write(sys.prefix.encode("utf-8"))']
logger.info('Testing executable with %s %s "%s"' % tuple(cmd))
proc = subprocess.Popen(cmd,
proc_stdout, proc_stderr = proc.communicate()
e = sys.exc_info()
if e.errno == errno.EACCES:
logger.fatal('ERROR: The executable %s could not be run: %s' % (py_executable, e))
I'm hitting "raise e" and it outputs:
WindowsError: [Error 14001] This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem
After making the changes described in #293, I got more useful output:
Exception: The executable ['c:\\PROGRA~1\\BITNAM~1\\apps\\intranet\\django\\intranet\\VEB3C7~1\\Scripts\\python.exe', '-c', 'import sys;out=sys.stdout;getattr(out, "buffer", out).write(sys.prefix.encode("utf-8"))'] could not be run: [Error 14001] This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem
If I run that copy of python.exe manually from the command line, I just get:
The system cannot execute the specified program.
If I copy all the *.manifest and *.dll files from the Python directory, then it runs.
I think these should be copied by default, like python26.dll in issue #87.
Copy manifests and DLLs on Windows.
Hopefully fixes issue #294
at least it seems to work for me.
Generalises the code for copying multiple files from the source to the
destination, so it should be easier to read, and easier to add more files
to the list in future.