📌  相关文章
📜  twisted.internet.error.ReactorAlreadyInstalledError: reactor already installed [5804] Failed to execute script main - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:29.414000             🧑  作者: Mango

代码示例1
import kivy
kivy.require('1.9.1')

# fix for pyinstaller packages app to avoid ReactorAlreadyInstalledError
import sys
if 'twisted.internet.reactor' in sys.modules:
    del sys.modules['twisted.internet.reactor']

# install twisted reactor
from kivy.support import install_twisted_reactor
install_twisted_reactor()