Windows No-Install Distribution?

E

Eric Lemings

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.
 
A

Andrew Berg

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).
 
S

Stephen Hansen

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-----
 
E

Eric Lemings

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?
 
T

Terry Reedy

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.

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top