Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I distribute a Python program without requiring users to have a Python runtime? [duplicate]

I am planning to create a Python program and distribute it bundled with C# GUI. How can I distribute the Python part of the program without requiring users to have Python?

like image 313
Nathan2055 Avatar asked Apr 09 '13 22:04

Nathan2055


People also ask

How do you distribute a Python program?

Use PyInstaller, py2exe, Nuitka, or another bundling solution. The most convenient way to deliver a Python application to a user is to provide them with an executable—either a single file or a directory with an easily identified executable somewhere in it.

How do I protect Python code from being read by users?

The best solution to this vulnerability is to encrypt Python source code. Encrypting Python source code is a method of “Python obfuscation,” which has the purpose of storing the original source code in a form that is unreadable to humans.


2 Answers

Try py2exe or a similar tool. Or bundle the Python runtime with your software. To do that, you can use Pyinstaller.

like image 174
Tomas Andrle Avatar answered Sep 23 '22 13:09

Tomas Andrle


In the past, I have used py2exe (windows) so that I do not have to ask them to install python.

py2exe creates an exe which the user clicks and it runs without a problem.

If you want to go beyond this, package it with something like innosetup and it adds an installer which is better.

like image 21
ronak Avatar answered Sep 25 '22 13:09

ronak