12

How do I let my friends use my Python programs? They don't have python installed, but they can use command line programs. I don't have the skill to write GUI.

Let, say I am writing some calculus calculator, with a lot of custom modules and files. How do I share it?

ojrac
13.5k6 gold badges40 silver badges40 bronze badges
asked Dec 23, 2009 at 1:28
3

6 Answers 6

13

You could use something like py2exe to convert your Python program into an executable.

answered Dec 23, 2009 at 1:29
Sign up to request clarification or add additional context in comments.

5 Comments

will that convert all my modules too?
For the most part, yes. However, there are some that either won't work or need tinkering. See this page for more details: py2exe.org/index.cgi/WorkingWithVariousPackagesAndModules
Python 'freeze' also does this, and is newer. check out wiki.python.org/moin/Freeze
Any modules that you have imported in your code will be compiled into the DLLs that accompany the EXE that has been compiled from you code.
Since this question is quite old, but still relevant, apparently PyInstaller is a good solution as of 2019 : pyinstaller.org/index.html
7

another alternative you can try is Portable python.

Sasha Chedygov
132k27 gold badges107 silver badges117 bronze badges
answered Dec 23, 2009 at 1:35

1 Comment

It would be better to link to the homepage (portablepython.com) because the download link will quickly become out-of-date.
2

You have the options presented thus far: Portable Python and Py2Exe. Either can be pretty good.

My suggestion: encourage your friends to install Python! As you know, it's free, and simple to install and download. If they want your application bad enough, installing Python will be a no-brainer.

answered Dec 23, 2009 at 5:57

Comments

2

In 2019 I have been using PyInstaller mostly, works very well for all of my Python scripts I wish to convert to a single runnable exe.

answered Feb 20, 2019 at 13:54

Comments

1

A less general, but lightweight and simple way of putting many Python files into 1 or 2 files (Python programs) is Fredrik Lundh's squeeze program. When you "squeeze" a bunch of Python programs and modules, you can often produce a single Python program. People still need Python to run it (but it's included in most Unix distributions, including Mac OS X), but you can easily distribute it, as your program and modules are all bunched up in a single file.

answered Dec 23, 2009 at 10:53

Comments

1

http://hackerboss.com/how-to-distribute-commercial-python-applications/ mentions using preinstalled, bundled, and frozen interpreters, but i suggest for speed and security, to compile using Shed Skin, Iron Python, Cython, or PyPy. The psyco module also helps with speed if your code is old.

answered Nov 24, 2011 at 11:10

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.