Install Python 2.6 without using installer on Win32

后端 未结 6 1047
挽巷
挽巷 2020-12-14 03:08

I need to run a Python script on a machine that doesn\'t have Python installed. I use Python as a part of a software package, and Python runs behind the curtain without the

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-14 03:31

    From Sylvain Pointeau's blog:

    The procedure is actually very simple, just download the msi installer from http://www.python.org/getit/ and type the command:

    C:\development\apps>msiexec /a python-3.3.2.msi /qb TARGETDIR=C:\development\apps\python33

    His example uses msiexec (aka MSI Administrative Installer for you UniExtract people) to force an extract to TARGETDIR. You'll notice that there is an internal installer which you delete.

    EDIT: Also you can make it silent as well, but doing this every time you want to use python seems dumb. Just extract to a tempdir and then cleanup when they uninstall it.

    PS: I didn't see how old this was! :D

提交回复
热议问题