我目前在Windows 10 64x上使用Python 3.4并尝试使用CX_Freeze冻结我的应用程序。不幸的是,我收到一条错误消息:“导入错误:没有名为scipy.special._ufuncs_cxx的模块”。 这是我的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']
}
}
)
任何帮助请大家thx
答案 0 :(得分:0)
这个问题是基于scipy如何加载自身,并且有一个计划让cx_Freeze处理这些和其他此类问题 - 但它仍在进行中。但是,本期中的注释可以帮助您解决此问题:
https://bitbucket.org/anthony_tuininga/cx_freeze/issues/43/import-errors-when-using-cx_freeze-with