🇪thio ቴክ
3.64K subscribers
405 photos
74 videos
647 files
589 links
🔍 ስለቴክኖሎጂ አዳዲስ ና ትምህርት አዘል መረጃዎችን የሚያገኙበት ቻናል..
ውድ የኢትዮ ቴክ ቤተሰቦች እና የቻናላችን ተከታታዮች በሙሉ
⚠️ሃሳብ ና አስተያየት => @endu12endu @yoni709 @baydis
Download Telegram
You wrote an amazing Python application and showed it to your friend. He is impressed and wants to use it on his system. He neither has Python installed on his system and nor he has ever worked on it. You are stuck!!!

Convert Your Python Code into a Windows Application (.exe file)


To convert the Python code into an executable file, we will be using Pyinstaller package. Use the standard ‘pip install’ command to install this package.

#### Install Command

pip install pyinstaller

The Actual Task
Let’s go step by step to convert the Python file to a Windows executable:

Open the command prompt


Change folder location to the location of your Python code

#### Change Folder Location

cd folder_location

Use the following command to convert the Python file into a Windows executable

#### Command for conversion

pyinstaller --onefile filename.py


Replace " filename.py " to your python file name

The above code will create a single executable file with the same functionality as your python code. The executable file will be available in a new folder, dist, which will be available at the same location as your Python script.

#Python #Tip

@Ethiotec