473,626 Members | 3,459 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating Installer or Executable in Python

I have a small project which has around 10 .py files and I run this
project using command line arguments. I have to distribute this
project to somebody.

I was wondering how can I make an executable or some kind of
installer, so that end user doesn't need to compile and worry if he/
she has Python installed or not ?

Every help is greatly appreciated.

Thanks,

Nov 14 '07 #1
7 3565
A few candidate solutions:

http://nsis.sourceforge.net/Main_Page
http://www.jrsoftware.org/isinfo.php

DanielJohnson wrote:
I have a small project which has around 10 .py files and I run this
project using command line arguments. I have to distribute this
project to somebody.

I was wondering how can I make an executable or some kind of
installer, so that end user doesn't need to compile and worry if he/
she has Python installed or not ?

Every help is greatly appreciated.

Thanks,


--
Shane Geiger
IT Director
National Council on Economic Education
sg*****@ncee.ne t | 402-438-8958 | http://www.ncee.net

Leading the Campaign for Economic and Financial Literacy
Nov 14 '07 #2
Thanks for telling about py2exe.

Is there any utility that will help to make it as a .deb or .rpm file
(for Linux)?

Nov 14 '07 #3
On 14 Nov, 16:17, DanielJohnson <diffuse...@gma il.comwrote:
Thanks for telling about py2exe.
Also note that you should build an MSI installer e.g. using InnoSetup
after applying py2exe.

You could skip the py2exe part and only use InnoSetup to create an
MSI. Most likely your client will not care if the executable file is
called .py/.pyw/.pyc or .exe. Windows users are generally ignorant to
the contents of the Program Files folder. They will not understand
what is there and certainly not care what is there. Therefore, the
only thing that really matters is to make it easy to install and run
the program.

That is:

1. Create an MSI that makes it easy to install the software (including
runtime and dependencies).

2. Use autorun if you ship a DVD or CD-ROM. The installer should start
automatically when the disc is placed in the player.

3. Make sure an icon on the "Start Menu" launches the program.
If you have done that, 99.9% of all clients will be happy. The latter
0.01% is stupid enough to think it matters if the suffix of the
executable is called .exe or not. Never mind these morons, just ship
an .exe that does nothing except to spawn your Python program and
exit.

Is there any utility that will help to make it as a .deb or .rpm file
(for Linux)?
There is a tool called cx_Freeze which is similar to py2exe, except
that it works on several platforms, including Linux. You will have to
build the .deb or .rpm using other tools afterwards.


Nov 14 '07 #4
I'd second InnoSetup for Windows installers, it's easy and powerful (and
free). However, I don't think it can create actual .MSI files, only
..EXE installers. I wish it would create .MSIs, since those are easier
to automatically deploy for large user groups.

I'm not aware of any free tools for building MSIs, but I'd love to find
one.

- Adam
-----Original Message-----
From: py************* *************** ***********@pyt hon.org
[mailto:py****** *************** *************** ***@python.org] On
Behalf
Of sturlamolden
Sent: Wednesday, November 14, 2007 9:54 AM
To: py*********@pyt hon.org
Subject: Re: Creating Installer or Executable in Python

On 14 Nov, 16:17, DanielJohnson <diffuse...@gma il.comwrote:
Thanks for telling about py2exe.
Also note that you should build an MSI installer e.g. using InnoSetup
after applying py2exe.

You could skip the py2exe part and only use InnoSetup to create an
MSI. Most likely your client will not care if the executable file is
called .py/.pyw/.pyc or .exe. Windows users are generally ignorant to
the contents of the Program Files folder. They will not understand
what is there and certainly not care what is there. Therefore, the
only thing that really matters is to make it easy to install and run
the program.

That is:

1. Create an MSI that makes it easy to install the software (including
runtime and dependencies).

2. Use autorun if you ship a DVD or CD-ROM. The installer should start
automatically when the disc is placed in the player.

3. Make sure an icon on the "Start Menu" launches the program.
If you have done that, 99.9% of all clients will be happy. The latter
0.01% is stupid enough to think it matters if the suffix of the
executable is called .exe or not. Never mind these morons, just ship
an .exe that does nothing except to spawn your Python program and
exit.

Is there any utility that will help to make it as a .deb or .rpm
file
(for Linux)?
There is a tool called cx_Freeze which is similar to py2exe, except
that it works on several platforms, including Linux. You will have to
build the .deb or .rpm using other tools afterwards.


--
http://mail.python.org/mailman/listinfo/python-list
Nov 14 '07 #5
On Nov 14, 9:17 am, DanielJohnson <diffuse...@gma il.comwrote:
Thanks for telling about py2exe.

Is there any utility that will help to make it as a .deb or .rpm file
(for Linux)?
You'll probably want to take a look at PyInstaller. It can be found
here:

http://pyinstaller.python-hosting.com/

Mike

Nov 14 '07 #6


Adam Pletcher wrote:
I'd second InnoSetup for Windows installers, it's easy and powerful (and
free). However, I don't think it can create actual .MSI files, only
.EXE installers. I wish it would create .MSIs, since those are easier
to automatically deploy for large user groups.

I'm not aware of any free tools for building MSIs, but I'd love to find
one.
I just learned about this one within the last week, wix
http://wix.sourceforge.net/

PHP.net uses it for their Windows installers.

-Shawn
>
- Adam
>-----Original Message-----
From: py************* *************** ***********@pyt hon.org
[mailto:py****** *************** *************** ***@python.org] On
Behalf
>Of sturlamolden
Sent: Wednesday, November 14, 2007 9:54 AM
To: py*********@pyt hon.org
Subject: Re: Creating Installer or Executable in Python

On 14 Nov, 16:17, DanielJohnson <diffuse...@gma il.comwrote:
>>Thanks for telling about py2exe.
Also note that you should build an MSI installer e.g. using InnoSetup
after applying py2exe.

You could skip the py2exe part and only use InnoSetup to create an
MSI. Most likely your client will not care if the executable file is
called .py/.pyw/.pyc or .exe. Windows users are generally ignorant to
the contents of the Program Files folder. They will not understand
what is there and certainly not care what is there. Therefore, the
only thing that really matters is to make it easy to install and run
the program.

That is:

1. Create an MSI that makes it easy to install the software (including
runtime and dependencies).

2. Use autorun if you ship a DVD or CD-ROM. The installer should start
automaticall y when the disc is placed in the player.

3. Make sure an icon on the "Start Menu" launches the program.
If you have done that, 99.9% of all clients will be happy. The latter
0.01% is stupid enough to think it matters if the suffix of the
executable is called .exe or not. Never mind these morons, just ship
an .exe that does nothing except to spawn your Python program and
exit.

>>Is there any utility that will help to make it as a .deb or .rpm
file
>>(for Linux)?
There is a tool called cx_Freeze which is similar to py2exe, except
that it works on several platforms, including Linux. You will have to
build the .deb or .rpm using other tools afterwards.


--
http://mail.python.org/mailman/listinfo/python-list
Nov 14 '07 #7
Shane Geiger <sg*****@ncee.n etwrote:
DanielJohnson wrote:
I have a small project which has around 10 .py files and I run this
project using command line arguments. I have to distribute this
project to somebody.

I was wondering how can I make an executable or some kind of
installer, so that end user doesn't need to compile and worry if he/
she has Python installed or not ?

A few candidate solutions:

http://nsis.sourceforge.net/Main_Page
http://www.jrsoftware.org/isinfo.php
I've used py2exe and nsis quite a few times - works well.

Note that py2exe can bundle your app into a single exe which you can
just run which may be good enough (no need for an installer).

--
Nick Craig-Wood <ni**@craig-wood.com-- http://www.craig-wood.com/nick
Nov 15 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3149
by: Harald Schneider | last post by:
Hi, I ran in some problems with Gordon's Installer, after upgrading to Python 2.3.2: After starting the executable it brings up a ImportError: No module named wxPython.wx Before upgrading, everything went well. I can also run the .py file without any complaints in my system's current
1
1534
by: Ajay Bakhshi | last post by:
Hi, I have Python-2.2.3/ Mcmillian Installer: _5b5_5 System: HP 11.11 64 bit. Installer + Python were build with 64 bit support (Compiler flag: +DD64) I have a Python file Recover.py that calls "C" functions written in an extension module. Now these "C" functions (in the shared library) load
1
2632
by: Pierre Rouleau | last post by:
Hi all, When building a exe for a Python application under Windows XP with The McMillan installer, the insttaltion succeeds but when I run the resulting executable the application tracebacks complaining about a codec not being registered: Traceback (most recent call last): File "<string>", line 222, in ? File "ivcm\buildivcm\out1.pyz/gettext", line 428, in install
1
1980
by: Chris | last post by:
I would like to be able to "package-up" a Python application on my development platform (Linux) so that it can be easily distributed and installed on Windows and UNIX e.g. HP-UX, AIX etc. I'd rather not use Python's disutils. I've looked at cx_Freeze but this requires a "base executable" to be available for each target platform i.e. I'd need to compile this base executable on the target platforms but I don't have access to them all. I've...
4
2096
by: mrmakent | last post by:
3 quick questions for the newsgroup: 1. Does anyone know why McMillan Installer 5b5 does not work with Python 2.4 under Linux (works with Python 2.3 just fine), and how to fix it? 2. Will anyone be picking up the maintenance and development ball for McMillan Installer? 3. Is there another, better-supported solution for distributing a
1
2111
by: Jon H | last post by:
I'm trying to create an installer application that can be run from a web page. I know visual basic pretty well, but I haven't work with asp.net very long. Is there a simple way to do this? When using Windows Update, or McAfee .net, are they using "Web Applications", "Web Services", or "Web Contol Libraries"?
4
1432
by: John Salerno | last post by:
Well, now that I can time my laundry, I need to make it runnable. I tried looking for info on the freeze module in the help file, but it didn't seem to come up with much. According to the Python wiki, freeze is for making executables for Unix. Can I make an executable with just the standard distribution, or do I need a separate module? Thanks.
1
1851
by: Bernard Lebel | last post by:
Hello, I'd like to know how one can create a Windows installer executable. I have this bunch modules, html files, pictures and directories that I'd like to install in various places on a disk drive. When the executable is run, it's like pretty much any standard installation: user answers a few questions, click OK, and then everything is there. Thanks
12
1675
by: chardish | last post by:
Hello, I'm trying to build an executable with py2exe, but unfortunately the version I have is 0.6.6, which has a rather annoying bug that doesn't let you rename the executable file if you bundle everything in a single executable. It seems fairly unacceptable to tell our customers that they can't rename a file we send them. I hear this problem is fixed in 0.6.8, but unfortunately there's no standalone installer for py2exe 0.6.8 - the...
0
8268
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8641
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8510
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7199
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4202
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1812
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1512
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.