Makoto Miyazaki
Makoto Miyazaki

Reputation: 1993

Convert python script to an executable file or icon for Windows?

What is the simplest tool to convert a python script into an executable file?

I made a python script and requirements.txt which contains necessary packages for a virtual environment with python3.6. I gave them to my client so that he can create a virtual environment and execute the file by executing the three lines below in the console.

source activate
python __main__.py
deactivate

Basically he needs to run it once a day, so that my python script scrapes a stock index data release at the end of each day and does some data transformation and saves the data in a desired directory as excel files.

However my client told me "even the three lines are difficult for people who are not familiar with CUI. Can you make it like a clickable icon?"

Is there any tool that can easily package my python script and required packages as an executable file or icon? It doesn't have to be cool. A simple and primitive tool would serve our needs. My client has Windows 10 Pro 64bit but it has to be something that I can develop in my My work environment which is Mac OS Catalina.

Thank you!

Upvotes: 1

Views: 3912

Answers (1)

Robindpw
Robindpw

Reputation: 88

Yes, it is possible following library's help with this.

PyInstaller can be used, under Mac OS X, Windows, Linux,...

For an example i would read this medium post, it should contain everything to get you started.

py2exe can be used if you only want an executable for the Windows platform.

Upvotes: 1

Related Questions