By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,272 Members | 1,733 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,272 IT Pros & Developers. It's quick & easy.

Creating Installer or Executable in Python

P: n/a
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
Share this Question
Share on Google+
7 Replies


P: n/a
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.net | 402-438-8958 | http://www.ncee.net

Leading the Campaign for Economic and Financial Literacy
Nov 14 '07 #2

P: n/a
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

P: n/a
On 14 Nov, 16:17, DanielJohnson <diffuse...@gmail.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

P: n/a
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***************************************@python.o rg
[mailto:py***************************************@p ython.org] On
Behalf
Of sturlamolden
Sent: Wednesday, November 14, 2007 9:54 AM
To: py*********@python.org
Subject: Re: Creating Installer or Executable in Python

On 14 Nov, 16:17, DanielJohnson <diffuse...@gmail.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

P: n/a
On Nov 14, 9:17 am, DanielJohnson <diffuse...@gmail.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

P: n/a


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***************************************@python.o rg
[mailto:py***************************************@p ython.org] On
Behalf
>Of sturlamolden
Sent: Wednesday, November 14, 2007 9:54 AM
To: py*********@python.org
Subject: Re: Creating Installer or Executable in Python

On 14 Nov, 16:17, DanielJohnson <diffuse...@gmail.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 #7

P: n/a
Shane Geiger <sg*****@ncee.netwrote:
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 discussion thread is closed

Replies have been disabled for this discussion.