How can I install Python on a windows machine from a batch script or something like that.
The requirement is that I need to install it with no human interaction.
and for site packages. Is it possible to install the packages found here also automated :
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pymatlab
Its basic .exe installers with some next clicks.
Unpack the contents of Winpython, copy this folder to any windows-machine you like. Your done :-).
Concerning your 2nd question: Winpython is fully portable and comes with a GUI-Installer for 3rd-party python packages. Install all you need ONLY ONCE and copy the Winpython folder afterwards to all Windows-PC.
Cheers barrios
EDIT: The Anaconda python package seems to have a portable mode, too. It comes preinstalled with many scientific packages. So it should also be possible to install all needed packages ONCE and move the whole Anaconda folder to all machines, but I havn't tested that, yet.
Python is just an .msi like any other. You install python like this, using the msi:
msiexec /i python-2.7.6.msi /passive
(use /quiet
instead of /passive
if you don't want any output at all.... /passive
also requires no user input, but still shows the progress bar, which can be nice).
For 3rd party packages... if you can bootstrap distutils into the package (which you can do... check the distutils docs), you can use easy_install
. If you point easy_install
at a tar.gz
file, it will use it instead of trying to download via pypi (though you can allow it to do that too, if you want). This also works if you point it at the exes from the site you mentioned. At least, most of them... there are occasional ones that are different (wxpython, pyreadline are two that I know of).
i.e.
c:\python27\scripts\easy_install.exe my_module.py27-amd64.exe
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With