Skip to content

Generate a standalone release package

Grey Christoforo edited this page Dec 12, 2016 · 3 revisions

How to generate a standalone release package (for windows/OSX)


  1. Follow the install instructions for the platform from the README.md here.
  • Make sure you can run the program directly with python batch-iv-analysis.py before proceeding
  1. run pip install pyinstaller
  2. run
pyinstaller --hidden-import=scipy.linalg --hidden-import=scipy.linalg.cython_blas --hidden-import=scipy.linalg.cython_lapack --hidden-import=scipy.integrate --hidden-import=tkinter.filedialog --icon icon.ico batch-iv-analysis.py

in the project directory

  • The standalone release files will be in a newly created folder called dist
  • These files can then be copied to another computer to run the tool there

Gotchas

  1. "Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll." on processing a file:
    Copy all of the .dll files in site-packages/numpy/core to the same folder as the .exe
    copy ..\..\python-3.4.4.amd64\Lib\site-packages\numpy\core\*.dll dist\batch-iv-analysis\. (This gotcha can probably be fixed by using the --resource option for pyinstaller)

Anaconda

In anaconda:

conda install constructor
constructor . # this uses constructor.yaml to build an environment installer
#constructor --platform win-32 . # build for win32 (must be done on windows)