Reputation: 1806
i'm newbie for python programming, i'm having a .py file, now what shall i do so i can create an application from .py file and it can be istall and run in any linux pc, i try to packaging it but its just create .tar file where i need python to run it, is it any to do so,
thanks
Upvotes: 1
Views: 644
Reputation: 21258
Make sure that the main python file has #! /usr/bin/env python
as the first line, then make sure it has execute permission set (should be as easy as chmod +x file_name.py
).
Upvotes: 2
Reputation: 85613
From link:
"PyInstaller is a program that converts (packages) Python programs into stand-alone executables, under Windows, Linux, and Mac OS X. Its main advantages over similar tools are that PyInstaller works with any version of Python since 1.5, it builds smaller executables thanks to transparent compression, it is fully multi-platform, and use the OS support to load the dynamic libraries, thus ensuring full compatibility."
I have not used it never in linux so I can not give you more info
Upvotes: 1
Reputation: 4623
I think any modern Linux OS has Python installed, so you can just ditribute the .py file if it has no weird dependencies.
Upvotes: 0