gpt4 book ai didi

python-2.7 - py2exe 没有名为 lgamma 的模块

转载 作者:行者123 更新时间:2023-12-04 00:08:35 24 4
gpt4 key购买 nike

我正在尝试为 python 文件创建一个 exe 文件。 py2exe 创建可执行文件,但是当我运行可执行文件时,我得到以下回溯:

C:\Users\gkumar7\Desktop\AL_gui-master\AL_gui-master\dist>app.exe
Traceback (most recent call last):
File "app.py", line 5, in <module>
File "learning_curve.pyc", line 13, in <module>
File "sklearn\metrics\__init__.pyc", line 34, in <module>
File "sklearn\metrics\scorer.pyc", line 30, in <module>
File "sklearn\metrics\cluster\__init__.pyc", line 8, in <module>
File "sklearn\metrics\cluster\supervised.pyc", line 18, in <module>
File "sklearn\metrics\cluster\expected_mutual_info_fast.pyc", line 12, in <mod
ule>
File "sklearn\metrics\cluster\expected_mutual_info_fast.pyc", line 10, in __lo
ad
File "expected_mutual_info_fast.pyx", line 1, in init sklearn.metrics.cluster.
expected_mutual_info_fast (sklearn\metrics\cluster\expected_mutual_info_fast.c:5
007)
ImportError: No module named lgamma

这是我的 setup.py 文件:
dll_excludes = ['MSVCP90.dll', 'OLEAUT32.dll', 'USER32.dll', 'IMM32.dll', 'SHELL32.dll',
'ole32.dll', 'COMDLG32.dll', 'COMCTL32.dll', 'ADVAPI32.dll', 'mfc90.dll', 'msvcrt.dll',
'WS2_32.dll', 'WINSPOOL.DRV', 'GDI32.dll', 'VERSION.dll', 'KERNEL32.dll', 'ntdll.dll']

from distutils.core import setup
import py2exe, matplotlib, numpy
setup(console=['app.py'],
data_files=matplotlib.get_py2exe_datafiles(),
options = {"py2exe": {
"dll_excludes": dll_excludes,
"includes": ['scipy.sparse.csgraph._validation',
'scipy.special._ufuncs_cxx']
}
}, )

我也尝试过 cx_freeze,但一直收到类似的错误。任何帮助将非常感激。

最佳答案

包括sklearn.utils.lgamma在您的 py2exe 安装文件中。

关于python-2.7 - py2exe 没有名为 lgamma 的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27558296/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com