我使用pyinstaller 3.2(通过pip install pyinstaller获取)运行WinPython 3.4.4.3。pyinstaller创建EXE RuntimeError:调用Python对象时超出最大递归深度
现在我已经有一些非常简单的Qt4代码,我想转换为EXE,并且遇到了无法解决的问题。
验证码:
import sys
import math
from PyQt4 import QtGui, QtCore
import SMui
import numpy as np
from scipy.interpolate import InterpolatedUnivariateSpline
class SomeCalculation(QtGui.QMainWindow, SMui.Ui_MainWindow):
def __init__(self):
super(self.__class__, self).__init__()
self.setupUi(self)
self.setWindowTitle('Some Calculation')
self.calculate.clicked.connect(self.some_math)
def some_math(self):
a_diameter=self.a_diameter.value()
b_diameter=self.b_diameter.value()
complement=self.complement.value()
angle=self.angle.value()
preload=self.preload.value()
### ONLY MATH HAPPENS HERE also defining X and Y ####
interpolator = InterpolatedUnivariateSpline(X, Y)
### MORE MATH HAPPENS HERE ####
self.axial.setText(str(axial))
self.radial.setText(str(radial))
def main():
app = QtGui.QApplication(sys.argv)
window=SomeCalculation()
window.show()
app.exec_()
if __name__=='__main__':
main()
我尝试运行pyinstaller file_name.py
和我越来越:
RuntimeError: maximum recursion depth exceeded while calling a Python object
现在,如果有,我发现,也影响了问题的几件事:
1)如果我注释掉这一行:from scipy.interpolate import InterpolatedUnivariateSpline
2)从使用Scipy.Interpolate(RBS,但仍然)的另一个不同脚本创建EXE文件 - 像魅力一样工作。 3)如果我尝试使用WinPython 3.5.1.1 + pyinstaller将其转换为EXE,并且它是相同的3.2版本 - 它生成我的exe文件没有问题。
我想了解是什么原因造成的错误,我不能找到谷歌任何答案不幸的是,我可以找到的大多数修复与matplotlib相关,而不是插值。
你有没有解决这个问题? – Eoin