Cx_freeze cannot import "process" name when using statsmodels.api

I'm trying to freeze a bunch of scripts using cz_freeze, but I get this error message (seems to be due to statsmodels.api) when I run the .exe:

I was unable to copy the text from the dialog, so the image would have to do. My apologies.

My cx_freeze build script:

# -*- coding: utf-8 -*-
"""
Created on Thu Mar 30 11:04:36 2017

@author: Max
"""

import sys
from os import environ
from os.path import dirname
from cx_Freeze import setup, Executable
import scipy
scipy_path = dirname(scipy.__file__)


# Set the TCL and TK library explicitly (it seems like the python 3.6 causes
# errors otherwise):
environ['TCL_LIBRARY'] = r'C:\ProgramData\Anaconda3\tcl\tcl8.6'
environ['TK_LIBRARY'] = r'C:\ProgramData\Anaconda3\tcl\tk8.6'


#Inclusion of dll files to fix tkinter import:
include_files = [r'C:\ProgramData\Anaconda3\DLLs\tcl86t.dll', 
                 r'C:\ProgramData\Anaconda3\DLLs\tk86t.dll', 
                 scipy_path]
#Inclusion of modules that need to be explicitly imported for some reason:
packages = []#['pyteomics']

#Dependencies that are not implicitly detected:
build_exe_options = {'includes': ['numpy.core._methods', 'numpy.lib.format'], 
                     'excludes': [],
                     'include_files': include_files, 
                     'packages': packages}

# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
if sys.platform == 'win32':
    base = 'Win32GUI'

setup(  name = 'Davidek beta 1.1.1',
        version = '1.1.1',
        options = {'build_exe': build_exe_options},
        executables = [Executable('Davidek.py', base=base)])

      

Very humble import line:

import statsmodels.api as sm

      

I am running Python 3.6.0 on 64 bit Windows 10. Any advice is appreciated. Let me know if more information is needed.

+3


source to share





All Articles