我正在尝试使用cz_freeze冻结一堆脚本但是在运行.exe时我得到this error message(看似由于statsmodels.api):
我无法从对话框窗口复制文本,因此图像必须这样做。我很抱歉。
我的cx_freeze构建脚本:
# -*- 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)])
非常简陋的进口线:
import statsmodels.api as sm
我在64位Windows 10上运行Python 3.6.0。非常感谢任何提示。如果需要其他信息,请与我们联系。