我使用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