0

I used py2exe to build an exe of a program that uses scipy and numpy and I get the next error in the log file when I tried to run the program.

Traceback (most recent call last):
File "GLP2-e Admin.pyw", line 24, in <module>
File "C:\Python34\lib\site-packages\scipy\ndimage\__init__.py", line 161, in <module>
from .filters import *
File "C:\Python34\lib\site-packages\scipy\ndimage\filters.py", line 37, in <module>
from scipy.misc import doccer
File "C:\Python34\lib\site-packages\scipy\misc\__init__.py", line 51, in <module>
from scipy.special import comb, factorial, factorial2, factorialk
File "C:\Python34\lib\site-packages\scipy\special\__init__.py", line 629, in <module>
from .basic import *
File "C:\Python34\lib\site-packages\scipy\special\basic.py", line 18, in <module>
from . import orthogonal
File "C:\Python34\lib\site-packages\scipy\special\orthogonal.py", line 101, in <module>
from scipy import linalg
File "C:\Python34\lib\site-packages\scipy\linalg\__init__.py", line 190, in <module>
from ._decomp_update import *
File "<loader>", line 10, in <module>
File "<loader>", line 8, in __load
ImportError: (No module named 'scipy.linalg.cython_blas') 'Y:\\Factory\\GLP2-e Admin (Todos los archivos)\\Compilaciones\\Versión 2.1\\dist\\scipy.linalg._decomp_update.pyd'

I have tried some thing like put my setup.py file like this:

options  ={
    'py2exe': {
        'bundle_files' : 3,
        r'includes':[r'scipy.sparse.csgraph._validation',
                     r'scipy.special._ufuncs_cxx',],
        'packages' : ['encodings'],
        }
    },

But it doesn't work and I still get that error. I don't know what to do to solve this issue... Hope you can help me. Thanks.

  • Why dont you use `pyinstaller ` , it automatically imports all the required modules – Eular Jul 04 '16 at 13:07
  • @Eular there are certain pros and cons to different code freezing tools. [Here is a list of them](http://docs.python-guide.org/en/latest/shipping/freezing/). E.g. the licensing can be of importance. [Here is a thread regarding different licensings](http://stackoverflow.com/questions/3902754/mit-vs-gpl-license). – Ian Jul 04 '16 at 13:13
  • I have been reading on the internet, and I found that, PyInstaller and py2exe have an issue with numpy, scipy and matplotlib that can't import this libraries. – David González Blazman Jul 04 '16 at 13:14

1 Answers1

0

I have been solve the issue adding in the "includes" section of my setup.py all the files that the log file return me as missing. After 7 files, the program run without any error.