Windows No-Install Distribution?

Discussion in 'Python' started by Eric Lemings, Aug 23, 2011.

  1. Eric Lemings

    Eric Lemings Guest

    Hi,

    I would like to create/find a Python 3.x distribution that can be
    redeployed simply by copying a directory of required files; i.e.
    without the need for actually "installing" an MSI, modifying Windows
    registry entries, etc. First of all, will Python even work on Windows
    simply by copying files from one system to another? If so, does such
    a "no-install" distribution already exist? If not, what are the
    minimum set of Python 3.x files from a standard Windows Python
    installation required for proper/normal operation?

    Thanks,
    Eric.
     
    Eric Lemings, Aug 23, 2011
    #1
    1. Advertising

  2. Eric Lemings

    Redcat Guest

    Redcat, Aug 23, 2011
    #2
    1. Advertising

  3. Eric Lemings

    Andrew Berg Guest

    On 2011.08.23 10:29 AM, Eric Lemings wrote:
    > Hi,
    >
    > I would like to create/find a Python 3.x distribution that can be
    > redeployed simply by copying a directory of required files; i.e.
    > without the need for actually "installing" an MSI, modifying Windows
    > registry entries, etc. First of all, will Python even work on Windows
    > simply by copying files from one system to another? If so, does such
    > a "no-install" distribution already exist? If not, what are the
    > minimum set of Python 3.x files from a standard Windows Python
    > installation required for proper/normal operation?

    I unpacked the 32-bit version of CPython 3.2 from its installer into a
    folder and it seems to work. I haven't done any real testing, but it
    works for me (mainly I just need to have the files needed to build
    32-bit frozen binaries with cx_Freeze).

    --
    CPython 3.2.1 | Windows NT 6.1.7601.17592 | Thunderbird 5.0
    PGP/GPG Public Key ID: 0xF88E034060A78FCB
     
    Andrew Berg, Aug 23, 2011
    #3
  4. Eric Lemings

    Eric Lemings Guest

    On Aug 23, 9:31 am, Redcat <> wrote:
    > I haven't tried it myself yet, but mighthttp://www.portablepython.com/
    > be what you're looking for?


    Almost except it contains additional Python packages that I'm not
    interested in.
     
    Eric Lemings, Aug 23, 2011
    #4
  5. On 8/23/11 8:29 AM, Eric Lemings wrote:
    > I would like to create/find a Python 3.x distribution that can be
    > redeployed simply by copying a directory of required files; i.e.


    Just take the default installer, install it, and then check the Python
    directory: does it have the python DLL? If not, go look into the
    system32 directory, grab it, drop it in the Python directory. (If you
    installed for all-users this will happen,

    Now copy/zip/whatever that Python directory to another machine where it
    was not installed. It'll work fine.

    You'll have to explicitly provide the path to the Python.exe of course;
    you can't just double-click on a .py or run 'python blah.py', but if
    your shortcuts/whatever all do C:\Where\You\Installed\Python.exe,
    everything should just work.

    We do that at work and never run into any trouble. (We actually provide
    a MSI but only for convenience of customers who want to auto-install via
    Group Policy).

    In most situations, Python's good at "finding itself", i.e. where the
    python.exe is actually located -- and it boostraps the location of
    everything else based on that.

    --

    Stephen Hansen
    ... Also: Ixokai
    ... Mail: me+list/python (AT) ixokai (DOT) io
    ... Blog: http://meh.ixokai.io/


    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.10 (Darwin)

    iQEcBAEBAgAGBQJOVAUUAAoJEKcbwptVWx/lu6gH/2FSClybtrW1SapOvRjwqRW4
    7etoqdO52TVIW38bmOxvlxIbvZxPBGYQk2PExcD9U5DwMiU93tVdxkv9nleIc0x7
    gTmS47dp3qjNTBeFa+0yY8EHuMm/XGxlz9sVz1KP2IqpaRhSboV4WUekC6Xna0h+
    VyWeOOEoDvy/0OI9Ria/UujanA/O/fQt1MZ6veDpkbJtisAHg19o3aIRh6yGmbjz
    yysMHF4c+1bBoC+39g9kV7vjyx5t2jVHaxsBPhKEHz57oXd+LZTqrA5fLe56/9ii
    UX66RjYU4Wkly1IT8NZF2/kivyaofqVuVGdJQ38MbMfmqD82IRE+cslCSrAHZGg=
    =5adt
    -----END PGP SIGNATURE-----
     
    Stephen Hansen, Aug 23, 2011
    #5
  6. Eric Lemings

    Eric Lemings Guest

    On Aug 23, 1:52 pm, Stephen Hansen <me+list/> wrote:
    > On 8/23/11 8:29 AM, Eric Lemings wrote:
    >
    > > I would like to create/find a Python 3.x distribution that can be
    > > redeployed simply by copying a directory of required files; i.e.

    >
    > Just take the default installer, install it, and then check the Python
    > directory: does it have the python DLL? If not, go look into the
    > system32 directory, grab it, drop it in the Python directory. (If you
    > installed for all-users this will happen,
    >
    > Now copy/zip/whatever that Python directory to another machine where it
    > was not installed. It'll work fine.
    >
    > You'll have to explicitly provide the path to the Python.exe of course;
    > you can't just double-click on a .py or run 'python blah.py', but if
    > your shortcuts/whatever all do C:\Where\You\Installed\Python.exe,
    > everything should just work.
    >
    > We do that at work and never run into any trouble. (We actually provide
    > a MSI but only for convenience of customers who want to auto-install via
    > Group Policy).
    >
    > In most situations, Python's good at "finding itself", i.e. where the
    > python.exe is actually located -- and it boostraps the location of
    > everything else based on that.
    >
    > --
    >
    >    Stephen Hansen
    >    ... Also: Ixokai
    >    ... Mail: me+list/python (AT) ixokai (DOT) io
    >    ... Blog:http://meh.ixokai.io/
    >
    >  signature.asc
    > < 1KViewDownload


    Excellent start.

    Which files comprise the standard Python library? Only the files in
    the 'Lib' subdirectory or are more needed?
     
    Eric Lemings, Aug 23, 2011
    #6
  7. Eric Lemings

    Terry Reedy Guest

    On 8/23/2011 5:56 PM, Eric Lemings wrote:
    > On Aug 23, 1:52 pm, Stephen Hansen<me+list/> wrote:
    >> On 8/23/11 8:29 AM, Eric Lemings wrote:
    >>
    >>> I would like to create/find a Python 3.x distribution that can be
    >>> redeployed simply by copying a directory of required files; i.e.

    >>
    >> Just take the default installer, install it,


    except do a custom install and leave out what you do not want. (Tools?
    tcl/tk/idle?). You can leave out tests, but then you might want that, at
    least once, to test your no-install copy.

    >> and then check the Python
    >> directory: does it have the python DLL? If not, go look into the
    >> system32 directory, grab it, drop it in the Python directory. (If you
    >> installed for all-users this will happen,


    For Python3, python3.dll in in Python3y\DLLs even for all users install.
    I believe this is per MS recommendation. So just copy the entire
    python3y directory.

    > Which files comprise the standard Python library? Only the files in
    > the 'Lib' subdirectory

    That only has Python-coded modules.

    > or are more needed?

    C-coded modules are in /DLLs. I presume /libs is needed too but I do not
    really know, and I will not experiment.

    Just limit your install to what you want and copy everything.

    --
    Terry Jan Reedy
     
    Terry Reedy, Aug 24, 2011
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Oliver Denzel

    Re: C# windows app distribution thru web

    Oliver Denzel, Jul 7, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,123
    Oliver Denzel
    Jul 7, 2003
  2. Markus Stenzel

    Reverse Engineering of Windows Distribution

    Markus Stenzel, Jul 7, 2003, in forum: Python
    Replies:
    2
    Views:
    327
    Peter Hansen
    Jul 7, 2003
  3. Max Riedel
    Replies:
    0
    Views:
    334
    Max Riedel
    May 20, 2004
  4. Mark English

    Building Windows debug distribution

    Mark English, Dec 10, 2004, in forum: Python
    Replies:
    1
    Views:
    315
    Thomas Heller
    Dec 10, 2004
  5. i3dmaster

    conditional install/distribution

    i3dmaster, Sep 11, 2008, in forum: Python
    Replies:
    3
    Views:
    340
    Diez B. Roggisch
    Sep 15, 2008
Loading...

Share This Page