|
From: Sharma, G. <gir...@wu...> - 2016-03-09 05:25:30
|
Thank you Kloth for writing a code for me to figure out what is really missing. I ran the code for did numpy or matplotlib, I got the names of the files. But I already have them in my dist folder.
My exe is running fine on my system but not on other systems. If I install Anaconda Python 2.7 on other systems, exe runs on other computers as well.
________________________________________
From: Jeremy Kloth <jer...@gm...>
Sent: Tuesday, March 8, 2016 10:38 PM
To: Sharma, Girish
Cc: py2...@li...
Subject: Re: [Py2exe-users] .exe file working on my computer but not other computers
Ok. Here is a little script to see what imports are required for a
given module:
# -- begin --
import sys
initial = set(sys.modules)
# change this import as needed for testing
import numpy.core.multiarray
# determine which modules have been added by the import statement
loaded = set(sys.modules) - initial
# remove "placeholder" modules
loaded -= set(name for name in loaded if sys.modules[name] is None)
# remove built-in modules
loaded -= set(name for name in loaded if not
hasattr(sys.modules[name], '__file__'))
# finally, find the extension modules
for name in loaded:
fn = sys.modules[name].__file__
if fn.lower().endswith('.pyd'):
print(fn)
# -- end --
Copy/Paste the above into a new .py file and run it with python:
python somefile.py
The output will be the names of extension modules which are needed by
the given import. A quick test locally produces:
C:\Python27\lib\site-packages\numpy\random\mtrand.pyd
C:\Python27\lib\site-packages\numpy\core\umath.pyd
C:\Python27\lib\site-packages\numpy\fft\fftpack_lite.pyd
C:\Python27\lib\site-packages\numpy\core\multiarray.pyd
C:\Python27\lib\site-packages\numpy\linalg\_umath_linalg.pyd
C:\Python27\lib\site-packages\numpy\linalg\lapack_lite.pyd
The listed files should exist in the DIST directory of py2exe executable.
--
Jeremy Kloth
|