Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Distributing Python programs

Tags:

python

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?

like image 445
CppLearner Avatar asked Dec 23 '09 01:12

CppLearner


People also ask

How do I make a Python script distributable?

You can use a tool like PyInstaller to convert your script (. py file) into an executable (.exe on windows). The way that works is PyInstaller copies both the python interpretor and your script into a single file so that you can distribuite your program easily.

Can you redistribute Python?

A Python file, provided it only relies on the standard library, can be redistributed and reused. You will also need to ensure it's written for the right version of Python, and only relies on the standard library.

Should I package my python project?

Yes, its a good idea to package projects especially if you want to use them in multiple environments. pip can install a local wheel or archive, a local directory where you've checked out the code, a private web server, one of several version control systems like git.


2 Answers

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

like image 161
Sasha Chedygov Avatar answered Sep 30 '22 20:09

Sasha Chedygov


another alternative you can try is Portable python.

like image 26
ghostdog74 Avatar answered Sep 30 '22 22:09

ghostdog74