{"id":13822228,"url":"https://github.com/jabbalaci/PythonEXE","last_synced_at":"2025-05-16T15:33:29.555Z","repository":{"id":140437717,"uuid":"169917944","full_name":"jabbalaci/PythonEXE","owner":"jabbalaci","description":"How to create an executable file from a Python script?","archived":false,"fork":false,"pushed_at":"2025-04-18T14:40:47.000Z","size":345,"stargazers_count":282,"open_issues_count":2,"forks_count":29,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-04-19T04:11:18.573Z","etag":null,"topics":["exe","pipenv","pyinstaller","python","python3","virtual-environment"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jabbalaci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-02-09T21:55:13.000Z","updated_at":"2025-04-18T14:40:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"d0a0a5ed-65d4-4932-bc39-2acde012f673","html_url":"https://github.com/jabbalaci/PythonEXE","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jabbalaci%2FPythonEXE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jabbalaci%2FPythonEXE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jabbalaci%2FPythonEXE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jabbalaci%2FPythonEXE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jabbalaci","download_url":"https://codeload.github.com/jabbalaci/PythonEXE/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254556822,"owners_count":22091007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exe","pipenv","pyinstaller","python","python3","virtual-environment"],"created_at":"2024-08-04T08:01:49.654Z","updated_at":"2025-05-16T15:33:29.543Z","avatar_url":"https://github.com/jabbalaci.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"Python EXE Maker\n================\n\nThis little project shows you how to build an executable file\nof your Python code.\n\nHere, `hello.py` is the main file. It uses a module (`helper.py`),\nit imports the `os` module from the stdlib, and it even uses\na 3rd-party library (`requests`).\n\nWith PyInstaller, you can easily create a single executable file from\nthis project.\n\n    $ pyinstaller --onefile hello.py\n\nUnder Windows you might have a problem with this. If the `.exe` complains that\na DLL is missing, then try this variation:\n\n    $ pyinstaller --onefile --noupx hello.py\n\nYou'll find the exe in the `dist/` folder.\n\nWhy would you need an EXE?\n--------------------------\n\nEXE is a file extension for an executable file format. It makes distributing your\nprogram much easier. The exe produced by PyInstaller is standalone.\nIt means that it's enough to give this exe to your friend and (s)he can run it right away.\nThere is no need to install Python on his/her machine, no need to create a virtual environment, etc.\nUnder Windows you can simply start an exe with a double click.\n\nOf course, if your friend uses Windows (Linux), then create the exe under\nWindows (Linux).\n\nWill my EXE run faster?\n-----------------------\n\n**No.** PyInstaller simply creates a bundle that contains everything: your code,\nthe necessary modules / packages, the virtual environment, the Python interpreter, etc.\nWhen you launch the EXE, it is extracted to your temp folder (under Linux\nit's the `/tmp` folder), and your application is started from there. So the\nruntime will be approximately the same.\n\nFor a demo, check out my simple Fibonacci implementation in the folder `speed_test`.\n\nMaking an EXE\n-------------\n\nThe project uses the [uv](https://docs.astral.sh/uv/) package manager. Download\nthe project and enter its folder. Then, issue the command\n\n    $ uv sync\n\nWith this ^ command you can create the virtual environment\nand install the necessary packages in the virt. env.\n\nThen, try to execute the program:\n\n    $ make run\n\nIf it works, create an executable of it\nby using one of the following commands:\n\n    $ make exe\n\nor\n\n    $ make exe2\n\nThe EXE will be stored in the `dist/` folder.\n\nVideo\n-----\n\nClick on the image below to open a YouTube video that shows you everything step-by-step:\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://www.youtube.com/watch?v=2XBjnfx3g3U\"\u003e\u003cimg width=\"60%\" src=\"assets/screenshot.png\" alt=\"view demo on YouTube\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\nChanges since the video was made:\n\n* The project was updated to Python 3.13.\n* In the video I talk about pipenv, but the project was updated to use uv.\n\nLinks / News / Related Work\n---------------------------\n\n* This project of mine got included in [PyCoder's Weekly -- Issue #355](https://pycoders.com/issues/355)\nunder the title \"PythonEXE: How to Create an Executable File From a Python Script?\"\n* Reddit discussion: [here](https://old.reddit.com/r/learnpython/comments/aoxoki/i_made_a_sample_project_to_demonstrate_how_to/).\n* [Using PyInstaller to Easily Distribute Python Applications](https://realpython.com/pyinstaller-python/),\na blog post on the same topic\n* [PyUpdater](https://github.com/JMSwag/PyUpdater), a pyinstaller auto-update framework\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjabbalaci%2FPythonEXE","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjabbalaci%2FPythonEXE","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjabbalaci%2FPythonEXE/lists"}