Discussion:
[Py2exe-users] .exe file working on my computer but not other computers
Sharma, Girish
2016-03-07 03:27:41 UTC
Permalink
Hi all,


System:

Windows 7 64-bit

Anaconda 2.7 64-bit

py2exe 64-bit

Background:

I converted my python code to .exe using py2exe and setup.py file shown below:

from distutils.core import setup
import py2exe

from distutils.filelist import findall
import matplotlib

opts = {"py2exe": {
"packages" : ['matplotlib'],
"includes": ['scipy', 'scipy.integrate', 'scipy.special.*','scipy.linalg.*'],
'dll_excludes': ['libgdk-win32-2.0-0.dll',
'libgobject-2.0-0.dll',
'libgdk_pixbuf-2.0-0.dll']
}
}

setup(
windows = [{'script': "with_GUI.py"}], zipfile = None,
options= opts,
data_files = matplotlib.get_py2exe_datafiles()
)

But this gave me some error saying that there was version conflict with two files. So I changed the two files viz. dist/tcl/tcl8.5/init.tcl (in line 19) and dist/tcl/tk8.5/tk.tcl (in line 18). In my case I changed the version from 8.5.15 to 8.5.18. I found the location of the two files by looking at the path specified by the error in error log. Then the .exe worked just fine.

Problem:

I zipped the dist folder which contains .exe file. Then, I unzipped it on another computer but it is not working there. Following is the error it shows:

Traceback (most recent call last):
File "Moment_Final.py", line 5, in <module>
File "matplotlib\__init__.pyc", line 122, in <module>
File "matplotlib\cbook.pyc", line 33, in <module>
File "numpy\__init__.pyc", line 180, in <module>
File "numpy\add_newdocs.pyc", line 13, in <module>
File "numpy\lib\__init__.pyc", line 8, in <module>
File "numpy\lib\type_check.pyc", line 11, in <module>
File "numpy\core\__init__.pyc", line 14, in <module>
File "numpy\core\multiarray.pyc", line 12, in <module>
File "numpy\core\multiarray.pyc", line 10, in __load
ImportError: DLL load failed: The specified module could not be found.

Please guide me what am I missing.
Massa, Harald Armin
2016-03-07 13:19:13 UTC
Permalink
Hello Girish,

Traceback (most recent call last):
> File "Moment_Final.py", line 5, in <module>
> File "matplotlib\__init__.pyc", line 122, in <module>
> File "matplotlib\cbook.pyc", line 33, in <module>
> File "numpy\__init__.pyc", line 180, in <module>
> File "numpy\add_newdocs.pyc", line 13, in <module>
> File "numpy\lib\__init__.pyc", line 8, in <module>
> File "numpy\lib\type_check.pyc", line 11, in <module>
> File "numpy\core\__init__.pyc", line 14, in <module>
> File "numpy\core\multiarray.pyc", line 12, in <module>
> File "numpy\core\multiarray.pyc", line 10, in __loadImportError: DLL load failed: The specified module could not be found.
>
> multiarray.py tries to import a file in line 10, most likely a .pyd
That .pyd is for some reasons not included in your distributed exe-file.

To analyse the problem:
- read the file numpy\core\multiarray.py
- check which file is imported in line 10

After finding the name of the file, check your dist-directory if that .pyd
is really missing.

If that .pyd is missing, you have 2 options:

a) there is an include-directive in py2exe options; you can try to
explicitly name the .pyd to be included
b) I had good results by explicitly importing files which import .pyd on a
top level, that is

my_toplevel_file_with_py2exepatches.py:

import sys
import numpy.core
import numpy.core.multiarray

More of these tricks you can find on http://py2exe.org/

Best wishes

Harald





>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://makebettercode.com/inteldaal-eval
> _______________________________________________
> Py2exe-users mailing list
> Py2exe-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/py2exe-users
>
>


--

GHUM GmbH
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607

Amtsgericht Stuttgart, HRB 734971
Sharma, Girish
2016-03-08 07:15:47 UTC
Permalink
Hi Massa,


Thank you for your quick response. I am a newbie to py2exe and a chemical Engineer by profession with little knowledge of computer science. So, please spare me if I do not understand some basics.

Update:
My exe is running on computers which have Anaconda 2.7 64-bit version installed on their computers.

You said:
To analyse the problem:
- read the file numpy\core\multiarray.py
- check which file is imported in line 10

But,
I could not find numpy\core\multiarray.py file in C:\Anaconda2\Lib\site-packages\numpy\core. Though I found multiarray.pyd file which I cannot open and see.

Also, could you please specify that how do I solve the problem using solution b) by using my_toplevel_file_with_py2exepatches.py: and import statements.




________________________________
From: Massa, Harald Armin <***@ghum.de>
Sent: Monday, March 7, 2016 7:19 AM
To: Sharma, Girish
Cc: py2exe-***@lists.sourceforge.net
Subject: Re: [Py2exe-users] .exe file working on my computer but not other computers

Hello Girish,


Traceback (most recent call last):
File "Moment_Final.py", line 5, in <module>
File "matplotlib\__init__.pyc", line 122, in <module>
File "matplotlib\cbook.pyc", line 33, in <module>
File "numpy\__init__.pyc", line 180, in <module>
File "numpy\add_newdocs.pyc", line 13, in <module>
File "numpy\lib\__init__.pyc", line 8, in <module>
File "numpy\lib\type_check.pyc", line 11, in <module>
File "numpy\core\__init__.pyc", line 14, in <module>
File "numpy\core\multiarray.pyc", line 12, in <module>
File "numpy\core\multiarray.pyc", line 10, in __load
ImportError: DLL load failed: The specified module could not be found.

multiarray.py tries to import a file in line 10, most likely a .pyd
That .pyd is for some reasons not included in your distributed exe-file.

To analyse the problem:
- read the file numpy\core\multiarray.py
- check which file is imported in line 10

After finding the name of the file, check your dist-directory if that .pyd is really missing.

If that .pyd is missing, you have 2 options:

a) there is an include-directive in py2exe options; you can try to explicitly name the .pyd to be included
b) I had good results by explicitly importing files which import .pyd on a top level, that is

my_toplevel_file_with_py2exepatches.py:

import sys
import numpy.core
import numpy.core.multiarray

More of these tricks you can find on http://py2exe.org/
[http://py2exe.org/pythonlogo.png]<http://py2exe.org/>

FrontPage - py2exe.org<http://py2exe.org/>
py2exe.org
py2exe. py2exe is a Python Distutils extension which converts Python scripts into executable Windows programs, able to run without requiring a Python installation.



Best wishes

Harald





------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval
_______________________________________________
Py2exe-users mailing list
Py2exe-***@lists.sourceforge.net<mailto:Py2exe-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/py2exe-users




--

GHUM GmbH
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607

Amtsgericht Stuttgart, HRB 734971
Massa, Harald Armin
2016-03-08 16:38:44 UTC
Permalink
Hi Sharma,


> Update:
> My exe is running on computers which have Anaconda 2.7 64-bit version
> installed on their computers.
>
> yes, because they have multiarray.pyd on their computer.

You said:

> To analyse the problem:
> - read the file numpy\core\multiarray.py
> - check which file is imported in line 10
>
> But,
> I could not find numpy\core\multiarray.py file
> in C:\Anaconda2\Lib\site-packages\numpy\core. Though I found multiarray.pyd
> file which I cannot open and see.
>

which makes your error message rather suspicious. Anyway, multiarray.pyd is
probably the binary file that is missing.

Have you checked if it is copied into the build directory?

pyexe builds an exe and a zip; or, if run in the single file mode, just an
.exe. That .exe can be "unzipped" by using 7zip. That allows you to check:
has multiarray.pyd be included?

>
> Also, could you please specify that how do I solve the problem using
> solution b) by using my_toplevel_file_with_py2exepatches.py: and import
> statements.
>
> IF the check (looking into build directory / checking what is zipped into
your .exe / .zip by py2exe) confirms, that mutliarray.pyd is NOT packaged,
we have to find a way to get in bundled.

The tools used by py2exe aim to find all needed library feels by simulating
the imports. As Python is more dynamic than anybody imagines; that may fail.

A trick that often works is: explicitly import the file

so, in your main script file, add the lines

import numpy.core
import numpy.core.mutliarray

and after doing the setup.py build step, check if mutliarray.pyd is
included in the build directory / the zipped up .exe file.

best wishes

Harald





> Traceback (most recent call last):
>> File "Moment_Final.py", line 5, in <module>
>> File "matplotlib\__init__.pyc", line 122, in <module>
>> File "matplotlib\cbook.pyc", line 33, in <module>
>> File "numpy\__init__.pyc", line 180, in <module>
>> File "numpy\add_newdocs.pyc", line 13, in <module>
>> File "numpy\lib\__init__.pyc", line 8, in <module>
>> File "numpy\lib\type_check.pyc", line 11, in <module>
>> File "numpy\core\__init__.pyc", line 14, in <module>
>> File "numpy\core\multiarray.pyc", line 12, in <module>
>> File "numpy\core\multiarray.pyc", line 10, in __loadImportError: DLL load failed: The specified module could not be found.
>>
>> multiarray.py tries to import a file in line 10, most likely a .pyd
> That .pyd is for some reasons not included in your distributed exe-file.
>
> To analyse the problem:
> - read the file numpy\core\multiarray.py
> - check which file is imported in line 10
>
> After finding the name of the file, check your dist-directory if that .pyd
> is really missing.
>
> If that .pyd is missing, you have 2 options:
>
> a) there is an include-directive in py2exe options; you can try to
> explicitly name the .pyd to be included
> b) I had good results by explicitly importing files which import .pyd on a
> top level, that is
>
> my_toplevel_file_with_py2exepatches.py:
>
> import sys
> import numpy.core
> import numpy.core.multiarray
>
> More of these tricks you can find on http://py2exe.org/
> <http://py2exe.org/>
> FrontPage - py2exe.org <http://py2exe.org/>
> py2exe.org
> py2exe. py2exe is a Python Distutils extension which converts Python
> scripts into executable Windows programs, able to run without requiring a
> Python installation.
>
>
> Best wishes
>
> Harald
>
>
>
>
>
>>
>>
>> ------------------------------------------------------------------------------
>> Transform Data into Opportunity.
>> Accelerate data analysis in your applications with
>> Intel Data Analytics Acceleration Library.
>> Click to learn more.
>> http://makebettercode.com/inteldaal-eval
>> _______________________________________________
>> Py2exe-users mailing list
>> Py2exe-***@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/py2exe-users
>>
>>
>
>
> --
>
> GHUM GmbH
> Harald Armin Massa
> Spielberger Straße 49
> 70435 Stuttgart
> 0173/9409607
>
> Amtsgericht Stuttgart, HRB 734971
>
>


--

GHUM GmbH
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607

Amtsgericht Stuttgart, HRB 734971
Sharma, Girish
2016-03-08 18:22:51 UTC
Permalink
Dear Massa,

I understood what you are saying. Thank you for explaining it more clearly to a newbie.

To analyse the problem:
- read the file numpy\core\multiarray.py
- check which file is imported in line 10

But,
I could not find numpy\core\multiarray.py file in C:\Anaconda2\Lib\site-packages\numpy\core. Though I found multiarray.pyd file which I cannot open and see.

which makes your error message rather suspicious. Anyway, multiarray.pyd is probably the binary file that is missing.

Have you checked if it is copied into the build directory?


Build directory has numpy\core\multiarray.pyc file.
Dist directory has numpy\core\multiarray.pyd file.

import sys
import numpy.core
import numpy.core.mutliarray


Anyways, I imported them in my mainscript.py. The exe ran on my computer as usual. But on a different computer, it showed me a bit different error.


Traceback (most recent call last):
File "Moment_Final.py", line 4, in <module>
File "numpy\__init__.pyc", line 180, in <module>
File "numpy\add_newdocs.pyc", line 13, in <module>
File "numpy\lib\__init__.pyc", line 8, in <module>
File "numpy\lib\type_check.pyc", line 11, in <module>
File "numpy\core\__init__.pyc", line 14, in <module>
File "numpy\core\multiarray.pyc", line 12, in <module>
File "numpy\core\multiarray.pyc", line 10, in __load
ImportError: DLL load failed: The specified module could not be found.

I am really not sure, what exactly am I missing.
line 4 of the Moment_Final.py (which is my mainscript.py) is:

import numpy.core

Please help.
Jeremy Kloth
2016-03-09 00:37:00 UTC
Permalink
On Tue, Mar 8, 2016 at 11:22 AM, Sharma, Girish <***@wustl.edu> wrote:
> Dear Massa,
>
> I understood what you are saying. Thank you for explaining it more clearly
> to a newbie.
>
> To analyse the problem:
> - read the file numpy\core\multiarray.py
> - check which file is imported in line 10
>
> But,
> I could not find numpy\core\multiarray.py file in
> C:\Anaconda2\Lib\site-packages\numpy\core. Though I found multiarray.pyd
> file which I cannot open and see.

multiarray.py is a stub file generated by py2exe for loading
multiarray.pyd. It will not be found in the normal Python module
locations.

> which makes your error message rather suspicious. Anyway, multiarray.pyd is
> probably the binary file that is missing.

Actually, in this case it is a module that is imported *by* multiarray
that is missing.

> Have you checked if it is copied into the build directory?
>
>
> Build directory has numpy\core\multiarray.pyc file.
> Dist directory has numpy\core\multiarray.pyd file.
>
> import sys
> import numpy.core
> import numpy.core.mutliarray
>

As I alluded to above, the multiarray module does imports in C which
py2exe cannot discover. The missing import is 'datetime' from the
Python standard library.

The "trick" used for adding missing modules to py2exe-generated
executables is to add an:

if 0:
import missing_module_1
import missing_module_2

to the main executable that is scanned by the py2exe setup.py. For
you, it should be sufficient to add "import datetime" to the forced
import block:

if 0:
import datetime

and regenerate the executable.

--
Jeremy Kloth
Sharma, Girish
2016-03-09 01:34:22 UTC
Permalink
Hi Kloth,

I think I understand what you mean. Could you please specify where should I add

>if 0:
> import datetime

There are three options:
1. setup.py file
2. mainscript.py file (I have just one file)
3. somewhere else (in some .py file in library)

Also, where exactly in the file. In the beginning of the imports or somewhere else?




________________________________________
From: Jeremy Kloth <***@gmail.com>
Sent: Tuesday, March 8, 2016 6:37 PM
To: Sharma, Girish
Cc: py2exe-***@lists.sourceforge.net
Subject: Re: [Py2exe-users] .exe file working on my computer but not other computers

On Tue, Mar 8, 2016 at 11:22 AM, Sharma, Girish <***@wustl.edu> wrote:
> Dear Massa,
>
> I understood what you are saying. Thank you for explaining it more clearly
> to a newbie.
>
> To analyse the problem:
> - read the file numpy\core\multiarray.py
> - check which file is imported in line 10
>
> But,
> I could not find numpy\core\multiarray.py file in
> C:\Anaconda2\Lib\site-packages\numpy\core. Though I found multiarray.pyd
> file which I cannot open and see.

multiarray.py is a stub file generated by py2exe for loading
multiarray.pyd. It will not be found in the normal Python module
locations.

> which makes your error message rather suspicious. Anyway, multiarray.pyd is
> probably the binary file that is missing.

Actually, in this case it is a module that is imported *by* multiarray
that is missing.

> Have you checked if it is copied into the build directory?
>
>
> Build directory has numpy\core\multiarray.pyc file.
> Dist directory has numpy\core\multiarray.pyd file.
>
> import sys
> import numpy.core
> import numpy.core.mutliarray
>

As I alluded to above, the multiarray module does imports in C which
py2exe cannot discover. The missing import is 'datetime' from the
Python standard library.

The "trick" used for adding missing modules to py2exe-generated
executables is to add an:

if 0:
import missing_module_1
import missing_module_2

to the main executable that is scanned by the py2exe setup.py. For
you, it should be sufficient to add "import datetime" to the forced
import block:

if 0:
import datetime

and regenerate the executable.

--
Jeremy Kloth
Jeremy Kloth
2016-03-09 02:47:27 UTC
Permalink
On Tue, Mar 8, 2016 at 6:34 PM, Sharma, Girish <***@wustl.edu> wrote:
> Hi Kloth,
>
> I think I understand what you mean. Could you please specify where should I add
>
>>if 0:
>> import datetime
>
> There are three options:
> 1. setup.py file
> 2. mainscript.py file (I have just one file)
> 3. somewhere else (in some .py file in library)

In the mainscript.py file usually as it is not needed for the library
to operate normally.

> Also, where exactly in the file. In the beginning of the imports or somewhere else?

Its location is not really that important. But, to keep related
things together, I would place it after the other imports in the file.

--
Jeremy Kloth
Sharma, Girish
2016-03-09 03:50:57 UTC
Permalink
Hi Kloth,

The same error persists even after adding 'import time'.

I was just wondering about the Error
File "numpy\core\multiarray.pyc", line 10, in __load

I do not have the .py file in my system. I just have the multiarray.pyc file which I cannot read. So, do you what exactly is written in line 10, which it is unable to load?

Please suggest something. I have spent enormous amount of time in trying to solve this problem. Is it even solvable? What am I missing?

-
Girish Sharma
Jeremy Kloth
2016-03-09 04:01:10 UTC
Permalink
On Tue, Mar 8, 2016 at 8:50 PM, Sharma, Girish <***@wustl.edu> wrote:
> Hi Kloth,
>
> The same error persists even after adding 'import time'.

The import needed is 'datetime'.

--
Jeremy Kloth
Sharma, Girish
2016-03-09 04:05:03 UTC
Permalink
Sorry Kloth,

I used datetime only. While writing to you, I made a mistake. The order in my mainscript is:


from Tkinter import *
import numpy.core.multiarray
import math as ma # maths operations
import matplotlib.pyplot as plt # plotting
import numpy as np # for arrays
from scipy.integrate import ode # for integration
if 0:
import datetime



________________________________________
From: Jeremy Kloth <***@gmail.com>
Sent: Tuesday, March 8, 2016 10:01 PM
To: Sharma, Girish
Cc: py2exe-***@lists.sourceforge.net
Subject: Re: [Py2exe-users] .exe file working on my computer but not other computers

On Tue, Mar 8, 2016 at 8:50 PM, Sharma, Girish <***@wustl.edu> wrote:
> Hi Kloth,
>
> The same error persists even after adding 'import time'.

The import needed is 'datetime'.

--
Jeremy Kloth
Jeremy Kloth
2016-03-09 04:38:37 UTC
Permalink
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
Sharma, Girish
2016-03-09 05:25:23 UTC
Permalink
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 <***@gmail.com>
Sent: Tuesday, March 8, 2016 10:38 PM
To: Sharma, Girish
Cc: py2exe-***@lists.sourceforge.net
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
Sharma, Girish
2016-03-09 06:17:11 UTC
Permalink
Dear Kloth,

But the users would not wish to download and install Anaconda Python 2.7 on their computers just to run my exe. I feel There is a small mistake, which I am not able to catch. Please have a look at my setup.py file, if that helps.
Thank you for your time.

________________________________________
From: Sharma, Girish <***@wustl.edu>
Sent: Tuesday, March 8, 2016 11:25 PM
To: Jeremy Kloth
Cc: py2exe-***@lists.sourceforge.net
Subject: Re: [Py2exe-users] .exe file working on my computer but not other computers

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 <***@gmail.com>
Sent: Tuesday, March 8, 2016 10:38 PM
To: Sharma, Girish
Cc: py2exe-***@lists.sourceforge.net
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

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
Py2exe-users mailing list
Py2exe-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/py2exe-users
Jeremy Kloth
2016-03-09 08:39:32 UTC
Permalink
On Tue, Mar 8, 2016 at 11:17 PM, Sharma, Girish <***@wustl.edu> wrote:
> Dear Kloth,
>
> But the users would not wish to download and install Anaconda Python 2.7 on their computers just to run my exe. I feel There is a small mistake, which I am not able to catch. Please have a look at my setup.py file, if that helps.

In short, what you have done *should* work OOTB. However, there is a
bug (edge case really) within py2exe that is preventing this from
working.

To get you up and running, you will need to add 'libiomp5md.dll' and
'mkl_core.dll' to your DIST directory. They are located in
'<anacodadir>\Library\bin'.

As for the bug in py2exe, it relates to the usage of Windows API
function BindImageEx() on the 'mkl_intel_thread.dll' DLL. That
function is not finding any modules to bind (perhaps already bound?).
The fix for this would involve reading of the PE format directly to
locate the imported modules.

--
Jeremy Kloth
Sharma, Girish
2016-03-09 15:21:19 UTC
Permalink
Dear Kloth,

I cannot tell you how much helpful you were. Now, the exe is running on other computers. Thanks a lot Kloth. It would not be possible for me to get it done without your help. You are just awesome.

-
Girish Sharma

________________________________________
From: Jeremy Kloth <***@gmail.com>
Sent: Wednesday, March 9, 2016 2:39 AM
To: Sharma, Girish
Cc: py2exe-***@lists.sourceforge.net
Subject: Re: [Py2exe-users] .exe file working on my computer but not other computers

On Tue, Mar 8, 2016 at 11:17 PM, Sharma, Girish <***@wustl.edu> wrote:
> Dear Kloth,
>
> But the users would not wish to download and install Anaconda Python 2.7 on their computers just to run my exe. I feel There is a small mistake, which I am not able to catch. Please have a look at my setup.py file, if that helps.

In short, what you have done *should* work OOTB. However, there is a
bug (edge case really) within py2exe that is preventing this from
working.

To get you up and running, you will need to add 'libiomp5md.dll' and
'mkl_core.dll' to your DIST directory. They are located in
'<anacodadir>\Library\bin'.

As for the bug in py2exe, it relates to the usage of Windows API
function BindImageEx() on the 'mkl_intel_thread.dll' DLL. That
function is not finding any modules to bind (perhaps already bound?).
The fix for this would involve reading of the PE format directly to
locate the imported modules.

--
Jeremy Kloth
Sharma, Girish
2016-03-09 23:17:41 UTC
Permalink
Dear Kloth,

I thought that the exe was running fine but there is still a problem.

Background: In my .py file I used Tkinter to make a GUI and take inputs. Then I use scipy, numpy functions to create some plots, which I produce using matplotlib.

I thought the exe is running because there are no errors in the log file now and the Tkinter window opens, takes inputs but it fails to give me plots when I submit my inputs to the GUI (which I did not check earlier)

Following will explain the current problem better:

My computer Other computer
Anaconda Yes No
Python Yes No
exe without the 2 DLLs Yes No
exe with the 2 DLLs No* No*

*(opens GUI but no plot or data file, gives no error in log file)

This is my mainscript (Moment_Final.py) : https://github.com/girishsharma91/Python_github/blob/master/Moment_Final.py

This is my set up file (setup.py) :
https://github.com/girishsharma91/Python_github/blob/master/setup.py




________________________________________
From: Sharma, Girish <***@wustl.edu>
Sent: Wednesday, March 9, 2016 9:21 AM
To: Jeremy Kloth
Cc: py2exe-***@lists.sourceforge.net
Subject: Re: [Py2exe-users] .exe file working on my computer but not other computers

Dear Kloth,

I cannot tell you how much helpful you were. Now, the exe is running on other computers. Thanks a lot Kloth. It would not be possible for me to get it done without your help. You are just awesome.

-
Girish Sharma

________________________________________
From: Jeremy Kloth <***@gmail.com>
Sent: Wednesday, March 9, 2016 2:39 AM
To: Sharma, Girish
Cc: py2exe-***@lists.sourceforge.net
Subject: Re: [Py2exe-users] .exe file working on my computer but not other computers

On Tue, Mar 8, 2016 at 11:17 PM, Sharma, Girish <***@wustl.edu> wrote:
> Dear Kloth,
>
> But the users would not wish to download and install Anaconda Python 2.7 on their computers just to run my exe. I feel There is a small mistake, which I am not able to catch. Please have a look at my setup.py file, if that helps.

In short, what you have done *should* work OOTB. However, there is a
bug (edge case really) within py2exe that is preventing this from
working.

To get you up and running, you will need to add 'libiomp5md.dll' and
'mkl_core.dll' to your DIST directory. They are located in
'<anacodadir>\Library\bin'.

As for the bug in py2exe, it relates to the usage of Windows API
function BindImageEx() on the 'mkl_intel_thread.dll' DLL. That
function is not finding any modules to bind (perhaps already bound?).
The fix for this would involve reading of the PE format directly to
locate the imported modules.

--
Jeremy Kloth

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
Py2exe-users mailing list
Py2exe-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/py2exe-users
Jeremy Kloth
2016-03-09 23:30:00 UTC
Permalink
On Wed, Mar 9, 2016 at 4:17 PM, Sharma, Girish <***@wustl.edu> wrote:
> Dear Kloth,
>
> I thought that the exe was running fine but there is still a problem.
>
> Background: In my .py file I used Tkinter to make a GUI and take inputs. Then I use scipy, numpy functions to create some plots, which I produce using matplotlib.
>
> I thought the exe is running because there are no errors in the log file now and the Tkinter window opens, takes inputs but it fails to give me plots when I submit my inputs to the GUI (which I did not check earlier)

Well, the same problem that occured with mkl_intel_thread.dll is
probably happening with other modules. I've run out of time to
investigate further, but a quick solution would be to copy all the
.dll files from '<anacondadir>\Library\bin' to the DIST directory. It
adds bloat to the final distribution, but should fix the problem.

--
Jeremy Kloth
Sharma, Girish
2016-03-10 01:46:25 UTC
Permalink
Dear Kloth,

exe is running on other computers now without any problem though the size of the dist folder has increased. It is definitely much easier for the users than to install Anaconda. Thank you.

-
Girish Sharma

________________________________________
From: Jeremy Kloth <***@gmail.com>
Sent: Wednesday, March 9, 2016 5:30 PM
To: Sharma, Girish
Cc: py2exe-***@lists.sourceforge.net
Subject: Re: [Py2exe-users] .exe file working on my computer but not other computers

On Wed, Mar 9, 2016 at 4:17 PM, Sharma, Girish <***@wustl.edu> wrote:
> Dear Kloth,
>
> I thought that the exe was running fine but there is still a problem.
>
> Background: In my .py file I used Tkinter to make a GUI and take inputs. Then I use scipy, numpy functions to create some plots, which I produce using matplotlib.
>
> I thought the exe is running because there are no errors in the log file now and the Tkinter window opens, takes inputs but it fails to give me plots when I submit my inputs to the GUI (which I did not check earlier)

Well, the same problem that occured with mkl_intel_thread.dll is
probably happening with other modules. I've run out of time to
investigate further, but a quick solution would be to copy all the
.dll files from '<anacondadir>\Library\bin' to the DIST directory. It
adds bloat to the final distribution, but should fix the problem.

--
Jeremy Kloth
from_JP
2016-03-09 17:33:02 UTC
Permalink
I have been watching these emails for a few days because
I have had similar problems.

I program on Linux then copy the python py files to a
Win XP machine where I use py2exe to convert those files
for testing on the win XP machine.

After testing for bugs I use Inno Setup to produce a
package for installation on other computers.

My current, voice to text program is running on a
Dell Touch Screen machine, with a Win 10 O.S.

In the past I had similar problems until I got Inno to
work correctly..

To get Inno to work you will have to have your paths and files in
good order. If you can't get Inno to work you have a problem
to solve. If you get Inno to work you will most likely solve
you problem.

If I were having the problems that these emails to py2exe help
are concerned with I would give Inno Setup a try even if it got
me to think about the problem from a different angle.

That's my py2exe 2 cents,

jimonlinux for
inqvista.com
Loading...