Label1 = tk.Label(root, text= 'Hello World!', fg='blue', font=('helvetica', 12, 'bold'))Ĭanvas1.create_window(150, 200, window=label1)īutton1 = tk.Button(text='Click Me', command=hello, bg='brown',fg='white')Ĭanvas1. Windows and Mac OS X: do not provide a console window for standard i/o. Now save your Python script at your desired location.įor illustration purposes, let’s create a simple Python script that displays ‘Hello World!’ when clicking a button: import tkinter as tkĬanvas1 = tk.Canvas(root, width = 300, height = 300) After you do this, you name the spec file to PyInstaller instead of the script. Next, open the Windows “Command Prompt” and then type the following command to install the PyInstaller package: pip install pyinstaller Step 3: Save your Python Script To start, you may want to add Python to Windows path.Īn easy way to add Python to the path is by downloading a recent version of Python, and then checking the box to ‘ Add Python to PATH’ at the beginning of the installation:įinish the installation, and you should be good to go. Steps to Create an Executable using PyInstaller Step 1: Add Python to Windows Path In addition, PyInstaller can create executables for Windows, Linux, or macOS. ![]() ![]() ![]() Here are the full steps to accomplish this goal on Windows. In this step-by-step tutorial, youll learn how to use PyInstaller to turn. In this short guide, you’ll see how create an executable of a Python script using PyInstaller.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |