python - How to use pyinstaller with hidden imports for scipy.optimize leastsq -


my wxpython application compiled fine pyinstaller, until functionality, based on from scipy.optimize import leastsq statement added.

how fix this?

first time run command pyinstaller myscript.py in cmd, myscript.spec file created (or can create manually). file let specify hidden imports, , found (by long , tedious trial-error process) following hidden imports did trick:

'scipy.special._ufuncs_cxx' 'scipy.linalg.cython_blas' 'scipy.linalg.cython_lapack' 'scipy.integrate' 'scipy.integrate.quadrature' 'scipy.integrate.odepack' 'scipy.integrate._odepack' 'scipy.integrate.quadpack' 'scipy.integrate._quadpack' 'scipy.integrate._ode' 'scipy.integrate.vode' 'scipy.integrate._dop' 'scipy.integrate.lsoda' 

these should linked through hooks, not head around how, "quick&dirty" way.

now execute pyinstaller myscript.spec.

my full file looked along these lines:

# -*- mode: python -*- = analysis(['myscript.py'],              pathex=['c:\\sourcecode'],              hiddenimports=['scipy.special._ufuncs_cxx',                             'scipy.linalg.cython_blas',                             'scipy.linalg.cython_lapack',                             'scipy.integrate',                             'scipy.integrate.quadrature',                             'scipy.integrate.odepack',                             'scipy.integrate._odepack',                             'scipy.integrate.quadpack',                             'scipy.integrate._quadpack',                             'scipy.integrate._ode',                             'scipy.integrate.vode',                             'scipy.integrate._dop',                             'scipy.integrate.lsoda'],              hookspath=none,              runtime_hooks=none) pyz = pyz(a.pure) exe = exe(pyz,           a.scripts,           exclude_binaries=true,           name='myscript.exe',           debug=false,           strip=none,           upx=true,           console=true ) coll = collect(exe,                a.binaries,                a.zipfiles,                a.datas,                strip=none,                upx=true,                name='myscript') 

Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -