Pyinstaller linux12/19/2023 ![]() 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. 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) Note: If you use Linux, this tutorial assumes that you are not running Docker commands as the root user, but instead with a single user account that also has. 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 Here are the full steps to accomplish this goal on Windows. 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 |