小编H_F*_*our的帖子

pyinstaller创建EXE RuntimeError:调用Python对象时超出了最大递归深度

我正在使用pyinstaller 3.2(通过pip install pyinstaller获得)运行WinPython 3.4.4.3.

现在我有一些非常简单的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()
Run Code Online (Sandbox Code Playgroud)

我试着跑pyinstaller …

python recursion exe pyinstaller scipy

18
推荐指数
4
解决办法
2万
查看次数

标签 统计

exe ×1

pyinstaller ×1

python ×1

recursion ×1

scipy ×1