How to extract Python 3.5+ from installer?
Apparently casual Python installer since 3.5 has the MSIs I require embeded and they won't come out. There's however the web-installer for each Python and with that one you can do the same thing and get a working Python installation:
python-3.5.0-webinstall.exe /layout <folder>
This downloads the Release
MSIs files (not Debug
or PDB
only). Then you'll need to filter the files that have _d.msi
and _pdb.msi
suffix, which is trivial with Batch now and you end up with this structure:
core.msi
dev.msi
doc.msi
exe.msi
launcher.msi
lib.msi
path.msi
pip.msi
python-3.6.0-webinstall.exe
tcltk.msi
test.msi
tools.msi
and quite a lot of VS redistributables. Depending on your needs you may want to delete .exe
, .msu
(redists), _d.msi
, _pdb.msi
files in your working directory. The rest are Release
files and files that extend the interpreter functionality such as launcher(py.exe
), path(probably just permanently puts python to PATH
), etc.
If you run each of them with this:
msiexec.exe /a <file> targetdir=<folder>
you get a working portable Python installation. Note that such thing is not officially supported.
A sub-folder now contain all the .msi
files:
https://www.python.org/ftp/python/3.8.0/amd64/