-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Labels
discardedThis will not be worked onThis will not be worked on
Description
Describe the bug
I am writing a program that solve MIP and it works well when I directly run the code. But after I use pyinstaller to pack my code into an executable file and then when I run that file this error comes out("NameError: name 'cbclib' is not define").
To Reproduce
The whole logic is complicated, so I only extract the relevant one.
- The script as below
from mip import Model
import tkinter as tk
import sys
def run():
m = Model("load_planing")
r3 = str(m)
r3_label.configure(text=r3)
if __name__ == "__main__":
window = tk.Tk()
window.title('Multi-SOC Optimizer')
window.geometry('640x480')
window.configure(background='white')
calculate_btn = tk.Button(window, text='Start!',command=run)
calculate_btn.pack(side=tk.TOP)
r3_label = tk.Label(window)
r3_label.pack(side=tk.TOP)
window.mainloop()
sys.exit()
- Directly run the script on python is fine.
-
Use pyinstaller to pack the logic.
pyinstaller -F -n mip_debug mip_debug.py -
Run the exe file after packed. => error
Expected behavior
Running the exe file's outcome should be same as directly run on python.
Desktop (please complete the following information):
- Operating System, version: 64-bit operating system, win10
- Python version:3.8.3
- Python-MIP version (we recommend you to test with the latest version): 1.13.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
discardedThis will not be worked onThis will not be worked on

