Skip to main content

Create a stand-alone Windows distribution of a Python program

Project description

Utility to create a stand-alone distribution of a Python program, either a console or GUI program. py2win uses Python embedded distribution and pip to create the stand-alone distribution.


You first need to install Microsoft Visual Studio, compatible with your current Python installation. Then simply run:

pip install py2win

How to use

As a command in

  1. Define at least one entry point in your
         'gui_scripts': ['sample-gui=sample.gui:main'],
         'console_scripts': ['sample-console=sample.console:main'],
  1. Run the bdist_windows command
python --command-packages py2win bdist_windows

As a separate script to create an embedded distribution

from py2win.embed import EmbedPython

embed = EmbedPython('sample', '1.2.0')
embed.add_script('project.gui', 'main', 'project-gui', console=False)

Release notes


  • First release


The library is provided under the MIT license.

Copyright (c) 2017 Philippe Pinard

Project details

Release history Release notifications

This version
History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
py2win-0.1.0-py3-none-any.whl (14.7 kB) Copy SHA256 hash SHA256 Wheel py3
py2win-0.1.0.tar.gz (6.0 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page