From: Fahlgren, E. <eri...@sm...> - 2016-06-06 17:39:48
|
Dimitry, Here's my solution that's working with Python 2.7.11 win 64 and Numpy 1.10.4 (currently, but has worked for about four years now with each numpy/scipy update). First, exclude the three fortran libs from the build through a monkey patch: EXCLUDED_DLLS = ( 'libmmd.dll', # These next three are numpy and problematic, so we do them manually. 'libifcoremd.dll', 'libiomp5md.dll', … some other stuff ) origIsSystemDLL = py2exe.build_exe.isSystemDLL def isSystemDLL(pathname): basepath = _path.basename(pathname).lower() if basepath in INCLUDED_DLLS: return 1 if basepath in EXCLUDED_DLLS: return 1 return origIsSystemDLL(pathname) py2exe.build_exe.isSystemDLL = isSystemDLL Next, collect all the numpy dlls manually (not sure why I'm replacing the DOS backslashes, but whatever): import numpy numpyDir = path.split(numpy.__file__)[0] numpyDlls = [dll.replace("/", "\\") for dll in glob.glob(path.join(numpyDir, "core", "*.dll"))] del numpy, numpyDir Finally in the setup, include all the numpy DLLs with data_files: distutils.core.setup( data_files = [ … other stuff ("", numpyDlls), ], Might look like overkill, but it seems to work. Hope this helps, Eric From: Dimitry Demin [mailto:pos...@gm...] Sent: Monday, June 06, 2016 05:03 To: Py2...@li... Subject: [Py2exe-users] numpy Dear All, I have an error issue with numpy Version: 1.11.0 on site computers. Seems py2exe doesn't sheep all the dlls. Any ideas are highly appreciated! Sincerely Dimitry |