We are shipping our product to customers location who may or may not have python and other libraries installed, so can we reduce our python script into an independent executable with python and other required libraries included , so are there other ideas ?
Asked
Active
Viewed 947 times
5
-
`pyinstaller` is what your looking for... – K DawG Dec 03 '13 at 17:59
-
1Depends on the operating system. Windows has py2exe, for example. – BoppreH Dec 03 '13 at 18:05
2 Answers
1
You can use py2exe it does exactly what you need, and its very easy to use. I have used it on one of my projects which are online and used daily.
and here is their tutorial:

Yousef_Shamshoum
- 787
- 3
- 12
-1
You can deliver a package with Python and then apply one of these two methods:
Package With python + virtualenv
There's many solutions for that. One I like is virtualenv
, which can allow you to deploy a specific configuration of a Python project (with dependencies) on another machines.
Package With python + pip
Another way is to use pip
and write a requirements.txt
file at the root of your project, which contains every dependency (1 per line), for example:
django>=1.5.4
pillow
markdown
django-compressor
By doing pip -r requirements.txt
in the root dir, the program will install packages needed.
See also:

Community
- 1
- 1

Maxime Lorant
- 34,607
- 19
- 87
- 97
-
I meant I do not need to install everything at customer site. Virtual env needs python installation so it wont work – Dec 03 '13 at 18:11