This is probably not the best route (I was unable to figure out py2exe), but you could create a batch file that runs through binary installer packages, for install of python, pip and other, then run pip install -r requirements.txt
This method requires an internet connection if using pip.
You could also zip the python directory. Install python, unzip the folder, and copy it over?
Or include all the windows installer binaries?
pip example:
How to pip install packages according to requirements.txt from a local directory?
pip installer: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pip
python installer: https://www.python.org/downloads/
Example Batch script:
@ ECHO off
@ REM off
# msi examples
msiexec /i dependencies\python-2.7.6.msi
msiexec /i dependencies\pycurl-7.19.0.2.win32-py2.7.msi
# exe examples
start dependencies\paramiko-1.7.7.1.win32-py2.7.exe
start dependencies\pycrypto-2.3.win32-py2.7.exe
start dependencies\pip-1.5.4.win32-py2.7.exe
start dependencies\wxPython3.0-win32-3.0.0.0-py27.exe
pip install image
pip install -r requirements.txt
pause
example requirements.txt:
image==1.2
BeautifulSoup==3.2.1
PyYAML==3.10
beautifulsoup4==4.3.2
distribute==0.6.49
idna==0.3
pyparsing==2.0.1
python-dateutil==2.2
pywin==0.3.1
selenium==2.40.0
six==1.6.1
A useful pip function is to use pip freeze
(docs) to snag the dependencies/requirements.
example of setting python path in batch:
set path=%path%;C:\python27;C:\python27\scripts
reg ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path /t REG_EXPAND_SZ /d %path% /f