Profiling 64-bit python?

Sep 1, 2011 at 8:56 PM
Edited Sep 1, 2011 at 8:56 PM


I was trying to run the VS2010 Ultimate profiler with a 64-bit install of python and get an exception at line 46 when calling ctypes.PyDLL(profdll):

File "...\ctypes\", line 353, in __init__
WindowsError: [Error 193] %1 is not a valid win32 Application

Is there a workaround for profiling python programs which rely on 64-bit modules (and therefore a 64-bit interpreter) using the PTVS functionality?

Sep 1, 2011 at 10:06 PM
Edited Sep 1, 2011 at 10:08 PM

I discovered the problem and a fix, I'll post it here in case anyone else has this issue. Apparently PTVS detected my 7.1 Enthought 64-bit python install as 32-bit, as it was set to that under "arch" in the interpreter options. It also wouldn't let me change the value for whatever reason, all the boxes were greyed out. Solution is to just add your own interpreter with the same settings but with a changed architecture.

Sep 1, 2011 at 11:34 PM

Sorry you had an issue there, but thank you for troubleshooting for us.  I've opened bug 498 to track it, so we can do a better job.