0

I am currently using Python 3.4 on my windows 10 64x and trying to freeze my application using CX_Freeze. Unfortunetly, I get an error message : "Import error : No module named scipy.special._ufuncs_cxx". Here is my setup.py :

# -*- coding: Latin-1 -*-
    import sys
    import scipy
    from cx_Freeze import setup, Executable
    import PyQt4

    packages=['PyQt4.QtCore', 'PyQt4.QtGui', 'sys', 'socket', 'pprint', 'pandas', 'datetime', 'json','numpy', 'scipy']

    include_files=['C:/Users/sadid/OneDrive/Documents/Visual Studio 2015/Projects/db/img/lib-ico.ico',
    'C:/Users/sadid/OneDrive/Documents/Visual Studio 2015/Projects/Lib/db/img']

    if sys.platform == 'win32':
        base = 'Win32GUI'

    exe = Executable(
        script='C:/Users/sadid/OneDrive/Documents/Visual Studio 2015/Projects/Lib/Lib/main.py',
        initScript = None,
        base=base,
        targetName='Lib.exe',
        copyDependentFiles = True,
        compress = True,
        icon='C:/Users/sadid/OneDrive/Documents/Visual Studio 2015/Projects/LibAppCustomer/LibAppCustomer/db/img/lib-ico.ico'
    )

    setup(
        name ='LibApplication',
        version = '1.0.0',
        description = 'Pricing\'s Application',
        author = 'DIKSA',
        executables = [exe],
        options = {
            "build.exe": {
                "packages": packages,
                'include_files': include_files,
                'includes' : ['scipy.special._ufuncs_cxx']
            }
        }
    )

Any help please guys thx

Sadi Aoun
  • 1
  • 4

1 Answers1

0

This issue is based on how scipy loads itself and there is a plan in place to have cx_Freeze handle these and other such issues -- but it is still in progress. The comments in this issue, however, can help you workaround the issue for now:

https://bitbucket.org/anthony_tuininga/cx_freeze/issues/43/import-errors-when-using-cx_freeze-with

Anthony Tuininga
  • 6,388
  • 2
  • 14
  • 23