title: Install MiniConda and Extra Packages
body: <p>I need to distribute a python 2.7 windows installation with the openpyxl module in a corporate environment with no admin or live access to the repository. There are a number of openpyxl prerequisites.</p>
  
  <p>Installing miniconda normally involves the user downloading the correct installation for their operating system with the installation managing correct module installation. I'd prefer not to hard-code versions because they will become outdated some time after they are downloaded but I can't see any way around it.</p>
  
  <p>I am looking to include the following batch file in a zip file (say like <a href="https://stackoverflow.com/a/30896241/4539999">self-extracting archive</a>). Is there a smarter way to assemble the software and distribute it?</p>
  
  <pre><code>@echo off
  rem Manual Download and Installing Anaconda Python Packages
  rem could change to use http://www.coreftp.com
  rem eg for miniconda2 with Python 2.7 at 14/06/2018
  rem Download MiniConda
  rem https://repo.continuum.io/miniconda/Miniconda2-latest-Windows-x86_64.exe
  rem Download coda packages from Anaconda repositories
  rem https://repo.continuum.io/pkgs/main/win-64/et_xmlfile-1.0.1-py27h1de5d23_0.tar.bz2
  rem https://repo.continuum.io/pkgs/main/win-64/jdcal-1.3-py27h8c72977_0.tar.bz2
  rem https://repo.continuum.io/pkgs/main/win-64/openpyxl-2.4.10-py27_0.tar.bz2
  rem
  set CondaInstallDir=%UserProfile%\AppData\Local\Continuum\miniconda2
  echo Installing MiniConda with extra packages to %CondaInstallDir%
  echo ^&lt;Ctrl^&gt;C to cancel OR
  pause
  echo Installing MiniConda to %CondaInstallDir%
  echo Please wait ...
  cd  %UserProfile%
  %~dp0Miniconda2-latest-Windows-x86_64 /AddToPath=0 /S /D=%CondaInstallDir%
  cd %CondaInstallDir%\Scripts
  %HomeDrive%conda install --offline %~dp0jdcal-1.4-py27_0.tar.bz2
  %HomeDrive%conda install --offline %~dp0et_xmlfile-1.0.1-py27h1de5d23_0.tar.bz2
  %HomeDrive%conda install --offline %~dp0openpyxl-2.4.10-py27_0.tar.bz2
  echo done.
  pause
  </code></pre>