Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Python program without installing required modules

Is there a way to move a my Python program to other computer without the need of re installing all the required module?

Maybe by compilation?

like image 441
Dotan Avatar asked Oct 21 '25 04:10

Dotan


1 Answers

I think you're looking for PyInstaller. By definition, PyInstaller is a program that converts (packages) Python programs into stand-alone executables, under Windows, Linux, Mac OS X, Solaris and AIX.

PyInstaller as of this writing, doesn't support Python 3. There is however this page on freezing your code or shipping:

Solution    | Windows | Linux | OS X | Python 3 | License | One-file mode | Zipfile import | Eggs | pkg_resources support
bbFreeze    | yes     | yes   |  yes | no       | MIT     | no            | yes            | yes  | yes
py2exe      | yes     | no    | no   | no       | MIT     | yes           | yes            | no   | no
pyInstaller | yes     | yes   | yes  | no       | GPL     | yes           | no             | yes  | no
cx_Freeze   | yes     | yes   | yes  | yes      | PSF     | no            | yes            | yes  | no

See cx_Freeze's documentation here.

like image 191
ComputerFellow Avatar answered Oct 22 '25 19:10

ComputerFellow



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!