0

It seems that SciPy and cx_freeze don't work together and is a known issue (https://bitbucket.org/anthony_tuininga/cx_freeze/issue/43/import-errors-when-using-cx_freeze-with). When I remove the import scipy then my code runs well.

I have researched here and few other websites and installed Dependency Walker. It says ieshims.dll is missing. I have installed ieshims.dll. I have installed all other .dll files. Now my console window gives me error as:

Traceback (most recent call last):
  File "PyMoss.py", line 13, in <module>
  File "C:\Python33\lib\site-packages\scipy\optimize\__init__.py", line 163, in <module>
    from .optimize import *
  File "C:\Python33\lib\site-packages\scipy\optimize\optimize.py", line 35, in <module>
    from .linesearch import (line_search_wolfe1, line_search_wolfe2,
  File "C:\Python33\lib\site-packages\scipy\optimize\linesearch.py", line 16, in <module>
    from scipy.optimize import minpack2
  File "<loader>", line 10, in <module>
  File "<loader>", line 8, in __load
ImportError: (DLL load failed: The specified module could not be found.)  
  'C:\\Python33\\dist\\scipy.optimize.minpack2.pyd'

I can see scipy.optimize.minpack2.pyd in my build folder but yet generates such error. Please help me out as I am able to run SciPy function in Python IDLE while I am unable to run the same function with cx_freeze or py2exe

Thanks in Advance

Riq
  • 182
  • 1
  • 2
  • 17
  • I don't know much about dependency walker, but you might be able to use SciPy by copying the whole `scipy` package folder into the cx_Freeze build directory (where your exe is created), and deleting scipy from library.zip. – Thomas K Aug 01 '14 at 19:08
  • @ThomasK : I did what you have suggested. Now I am getting error as `DLL load failed: %1 is not a valid Win32 application`. Please help me. – Riq Aug 01 '14 at 19:23
  • That error usually means that you're trying to mix 32 bit and 64 bit libraries/executables. – Thomas K Aug 01 '14 at 19:28
  • @ThomasK : I have reinstalled all of my libraries and all are in 64-bit. Now the error changed to the previous one. `scipy_optimize_minpack2.py.....The specified module could not be found`. I have my complete python script running in python IDLE, can you suggest me other installer making program which can make `.exe` files from `.py` files – Riq Aug 01 '14 at 20:20
  • Can you show the full error? As for alternatives: my project [pynsist](http://pynsist.readthedocs.org/en/latest/) makes an installer for your application, though not an exe. If you're on Python 2, there's also [pyinstaller](http://pyinstaller.org/), but that doesn't work if you're on Python 3. – Thomas K Aug 01 '14 at 20:51
  • @ThomasK : `Traceback (most recent call last): File "C:\Python33\lib\site-packages\scipy\optimize\__init__.py", line 163, in from .optimize import * File "C:\Python33\lib\site-packages\scipy\optimize\optimize.py", line 35, in from .linesearch import (line_search_wolfe1, line_search_wolfe2, File "C:\Python33\lib\site-packages\scipy\optimize\linesearch.py", line 16, in from scipy.optimize import minpack2 ImportError: (DLL load failed: The specified module could not be found.) 'C:\\Python33\\dist\\scipy.optimize.minpack2.pyd'` – Riq Aug 01 '14 at 20:57
  • Can you edit it into your question so it's easier to read. Thanks. – Thomas K Aug 01 '14 at 23:47
  • @ThomasK : Edited my question. Can you figure out why am I facing such problem making the installer using `SciPy`. – Riq Aug 01 '14 at 23:59
  • That message usually means that it couldn't find some other DLL that that one relies on. You might be able to work it out with dependency walker. This stuff is problematic because none of the tools to make exes from Python are very robust, and it's not something that projects like scipy normally have to deal with. – Thomas K Aug 02 '14 at 00:21
  • @ThomasK : I have installed almost 10 `.dll` files, but everytime I open Dependency Walker, it comes up with name of new `.dll` files. Here is a similar problem, http://stackoverflow.com/questions/17023419/win-7-64-bit-dll-problems . Is the problem with my computer or with the installer?? If I open the installer(.exe) in another computer will it run smoothly?? – Riq Aug 02 '14 at 16:04
  • That question appears to indicate that Dependency Walker can give you misleading results. I'm sorry, I don't think I know enough about this to help. – Thomas K Aug 03 '14 at 23:55

0 Answers0