CppLearner
CppLearner

Reputation: 17040

Distributing Python programs

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?

Upvotes: 12

Views: 8626

Answers (6)

pkiller162
pkiller162

Reputation: 422

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.

Upvotes: 2

Cees Timmerman
Cees Timmerman

Reputation: 19644

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.

Upvotes: 1

Eric O. Lebigot
Eric O. Lebigot

Reputation: 94475

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.

Upvotes: 1

Escualo
Escualo

Reputation: 42072

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.

Upvotes: 2

ghostdog74
ghostdog74

Reputation: 342273

another alternative you can try is Portable python.

Upvotes: 7

Sasha Chedygov
Sasha Chedygov

Reputation: 130777

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

Upvotes: 13

Related Questions