I finished my first complete python program and am trying to create an exe. I did successfully build the exe, but it runs and does nothing. I'm guessing it didn't include all the packages. I can specify these with the build_exe_options in cx_Freeze, but I don't know the difference between packages and excludes.
These are all the imports I use in my program
import os
import smtplib
from datetime import datetime, timedelta
from ftplib import FTP_TLS
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
Below is my current setup file
from cx_Freeze import setup, Executable
setup(
name = "FTPConnect",
version = "1.0",
description = "Connects to FTP to download docs",
executables = [Executable("main.py")]
)
I'm guessing I can do something like this, correct?
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {"packages": ["os", "smtplib", "datetime", "ftplib", "email.mime.text", "email.mime.multipart" ], "excludes": []}
setup(
name = "FTPConnect",
version = "1.0",
description = "Connects to FTP to download docs",
options = {"build_exe": build_exe_options},
executables = [Executable("main.py")]
)