파이썬 프로젝트 EXE로 만드는법
pyinstaller 말고 딴 방법은 없나요?
import sys
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from playsound import playsound
import threading
from PyQt5 import QtCore
class Where_Go(QtCore.QThread):
def init(self, parent = None):
super(Where_Go, self).init(parent)
def run(self):
print("어디로 가야하오")
playsound("Wherego.wav")
class R_key(QtCore.QThread):
def init(self, parent = None):
super(R_key, self).init(parent)
def run(self):
print("이쿠")
playsound("R_key.wav")
class Back_ping(QtCore.QThread):
def init(self, parent = None):
super(Back_ping, self).init(parent)
def run(self):
print("!")
playsound("back_ping.wav")
class Why_ping(QtCore.QThread):
def init(self, parent = None):
super(Why_ping, self).init(parent)
def run(self):
print("?")
playsound("why_ping.wav")
class MyWindow(QMainWindow):
def init(self, parent = None):
self.WhereGo = Where_Go()
self.RKey = Rkey()
self.Backping = Backping()
self.Whyping = Whyping()
super().init()
self.setGeometry(100, 200, 300, 400)
self.setFixedSize(300, 400)
self.setWindowTitle("리신")
self.setWindowIcon(QIcon('LeeSin.png'))
btn = QPushButton("어디로가야하오",self)
btn.move(100,50)
btn_2 = QPushButton("궁", self)
btn_2.move(100, 100)
back_btn = QPushButton("!",self)
back_btn.move(50,250)
why_btn =QPushButton("?",self)
why_btn.move(160,250)
btn.clicked.connect(self.WhereGo.start)
btn2.clicked.connect(self.RKey.start)
backbtn.clicked.connect(self.Backping.start)
whybtn.clicked.connect(self.Whyping.start)
app = QApplication(sys.argv)
window = MyWindow()
window.show()
app.exec_()
pyinstaller 말고 cx_freeze 라는 라이브러리와 py2exe 라이브러리를 이용하시면 될 것으로 보입니다.
pyinstaller 다음으로 cx_freeze 라이브러리가 많이 쓰이는 것으로 알고 있는데 이것을 쓰시면 될 것으로 보이구요.
이것마저도 안된다면 py2exe를 쓰셔야할 것으로 보입니다.