easy_install opens new console - can't read the output

Create issue
Issue #143 resolved
Marc Schlaich created an issue

Running "easy_install" opens a new console and closes it immediately after processing. I can't read any output.


  • Windows7 x64
  • Python 2.6

The problem seems the UAC from Windows. Starting a console with admin rights solves this issue. But maybe there is a better workaround for?

Edit: Yes, it is definitely an UAC problem. See http://stackoverflow.com/questions/583755/elevating-privileges-for-uac-using-manifest-open-new-console-window

Comments (15)

  1. Robert Myers

    Another work around (if you don't have admin rights) is to execute the command with python like:

    > C:\Python26\python.exe \path\to\easy_install [ARGS]

    Then a new window is not opened and the output is displayed in your command prompt.

  2. Former user Account Deleted

    Thank god at last an answer that works with 2008 Server this page needs more google juice

  3. Paul Moore

    This looks like a manifest issue. To avoid needing elevation, you can embed a manifest with contents

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
      <v3:trustInfo xmlns:v3="urn:schemas-microsoft-com:asm.v3"> 
            <v3:requestedExecutionLevel level="asInvoker" /> 

    I can try to work out the necessary incantation to embed that into easy_install.exe if no-one else already knows how.

    The issue (AIUI) is that Windows assumes that executables with "install" or "patch" in the name are installers, and requires elevation by default (to secure older installers that weren't written to request elevation. Backward compatibility hacks gone mad :-()

  4. Paul Moore

    Hmm, I just tried to reproduce the issue, and it doesn't seem to be happening for me. So I can't really develop a fix, as I don't see the problem. But if the problem does still exist, the above manifest should work.

  5. Marc Schlaich reporter

    Yes, it is still there in distribute 0.6.35, Python 3.3, Windows 7. Any instructions what to do with this manifest? :)

  6. Marc Schlaich reporter

    It is really the "install" in the executable name. A rename disables the UAC request.

  7. Marc Schlaich reporter

    Ok, I read a little bit: running

    mt.exe -manifest easy_install.exe.manifest -outputresource:easy_install.exe

    with the Manifest from above solves the problem. But I assume that "mt" is not available on every setup, so this is no general solution?!

  8. Jason Tan

    @pmoore it really is backward compatibility hacks gone mad. Have a look at "Installer Detection Technology".

    The general solution is to do what setuptools does: include an external easy_install.exe.manifest file which sits next to easy_install.exe. (Search for _launcher_manifest in their easy_install.py.)

    The contents are pretty much the same as the manifest items listed above:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <assemblyIdentity version=""
        <!-- Identify the application security requirements. -->
        <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
                <requestedExecutionLevel level="asInvoker" uiAccess="false"/>

    For existing installations:

    1. save the above as easy_install.exe.manifest in the Python Scripts directory
    2. force Windows to read the manifest by changing easy_install.exe's timestamp (essentially touch easy_install.exe)
  9. Jason R. Coombs

    This is very interesting. I'm only now looking into this issue. I didn't realize it was an ongoing issue, because it never affected me and I use console scripts in Python under distribute daily.

    After reading the references given, I see now the issue apparently only affects executables detected as installers (containing strings "like" 'install', 'setup', etc).

    Furthermore, it only affects 32-bit executables. Apparently, that's why I've never or only rarely encountered the issue, because I've been pretty dedicated to 64-bit for some time.

    Thanks to everyone for the great references and detail. I'll get this sorted shortly.

  10. Log in to comment