Python deployment options.

K

king kikapu

Hi to all folks here,

i just bought a book and started reading about this language.
I want to ask what options do we have to deploy a python program to
users that do not have the labguage installed ??

I mean, can i make an executable file, or something that contains the
runtime and the modules that the program only use or am i forced to
download the language to the user machine so the .py files can be run
??

Thanks in advance,

king kikapu
 
C

Chris_147

king said:
Hi to all folks here,

i just bought a book and started reading about this language.
I want to ask what options do we have to deploy a python program to
users that do not have the labguage installed ??

I mean, can i make an executable file, or something that contains the
runtime and the modules that the program only use or am i forced to
download the language to the user machine so the .py files can be run
??

Thanks in advance,

king kikapu

Well, on Windows you have to look for the Py2Exe package
(www.py2exe.org)
On Mac OS X you can use Py2App
(http://undefined.org/python/py2app.html)

Mind you, on Windows there is one big potentional problem: Python is
compiled with Visual Studio 2003 and needs msvcr71.dll. So Py2Exe
wants to distribute that dll also, but if you don't have a valid Visual
Studio license, you are not allowed to.
It is explained further in this thread:
http://groups.google.com/group/comp...5b7dae7ddd5/dacec12e300a74d4#dacec12e300a74d4

I doubt Microsoft will unleash their lawyers on you, but it is a
problem.
 
K

king kikapu

I see...So, if these are the only options, the only "safe" bet is to
install the language on the machine (beeing Win, Linux or Mac)
and execute the .py files, right ??
 
R

Richard Charts

king said:
I see...So, if these are the only options, the only "safe" bet is to
install the language on the machine (beeing Win, Linux or Mac)
and execute the .py files, right ??

Well on a Win machine, probably.
Almost every Linux machine you come across will have (most likely a
fairly recent build of) python. For Macs, I'm not so sure but it's
probably closer to Linux than Win.
 
C

Cameron Laird

.
.
.
Well on a Win machine, probably.
Almost every Linux machine you come across will have (most likely a
fairly recent build of) python. For Macs, I'm not so sure but it's
probably closer to Linux than Win.

Recent releases of Mac OS build in Python.
 
F

Fuzzyman

Chris_147 said:
Well, on Windows you have to look for the Py2Exe package
(www.py2exe.org)
On Mac OS X you can use Py2App
(http://undefined.org/python/py2app.html)

Mind you, on Windows there is one big potentional problem: Python is
compiled with Visual Studio 2003 and needs msvcr71.dll. So Py2Exe
wants to distribute that dll also, but if you don't have a valid Visual
Studio license, you are not allowed to.
It is explained further in this thread:
http://groups.google.com/group/comp...5b7dae7ddd5/dacec12e300a74d4#dacec12e300a74d4

I think that is an incorrect reading of the thread.

The *Python* developers need a valid Visual Studio license to
redistribute msvcr71.dll.

When you build an app with py2exe you are just bundling Python with
your application and so don't need the license.

Fuzzyman
http://www.voidspace.org.uk/index2.shtml
 
L

Larry Bates

king said:
I see...So, if these are the only options, the only "safe" bet is to
install the language on the machine (beeing Win, Linux or Mac)
and execute the .py files, right ??

py2exe and py2app work extremely well. I'm not sure why you wouldn't want
to use them if you want to distribute to those platforms. Actually they
take the installed version of python out of the equation (at least I know
py2exe does).

-Larry
 
S

sturlamolden

Fuzzyman said:
I think that is an incorrect reading of the thread.

The *Python* developers need a valid Visual Studio license to
redistribute msvcr71.dll.

When you build an app with py2exe you are just bundling Python with
your application and so don't need the license.


Here is a summary of my understanding of the "problem", mind you that I
am not a lawayer:

The Python.org developers use a properly licensed VC7 to build Python.
Under the EULA they can redistribute msvcr71.dll along with Python.
Anyone can distribute Python from Python.org, and msvcr71.dll is a part
of this software. Thus, it is at least legally to distribute a Python
MSI installer from Python.org. If you make a Python program, you can
distribute Python along with the program. I.e. you don't need a VC7
license to sell software that someone else has made and includes
msvcr71.dll.

For Py2Exe things are a bit more complicated. It rips
Python.Runtime.dll from the Python directory, and renames it
Python24.dll. Python24.dll then depends on msvcr71.dll. It's not
obvious that one can still legally distribute msvcr71.dll along with
Python24.dll, even if Python.Runtime.dll was built with a legally
licensed VC7. It is possible that Python24.dll or msvcr71.dll in the
process looses it status as licensee software from Python.org's VC7.The
Python.org team don't care about the issue, it seems. If they did care,
they could settle the issue by putting up a zip-file with Python24.dll
and msvcr71.dll for download. I don't think they quite understand how
important Py2Exe is on Windows.

Buying a VC7 license is cheaper than paying a lawyer that understands
the problem. However, even with a VC7 license you can only redistribute
msvcr71.dll with software you build your self - so you need to build
Python your self and not use a Python24.dll ripped from Python.org's
Python distro. But then ... who cares?

Microsoft wants you to make software for their OS. They even have their
own version of Python for free download (aka IronPython). A MS lawyer
harassing you for legal details regarding msvcr71.dll is beyond
unlikely, although you never know. You can play nice and ask Microsoft
for permission to put msvcr71.dll inside your Py2Exe'd Python app.
Whether they will respond or grant permission I don't know.

Finally, patent issues are more important when making software for a
living. Are you sure nobody has a broad patent covering parts of your
software? These are often held by parasitic companies that use broad
software patents as spider webs to catch prey. They will suck blood
from you if they can, and give you less than nothing in return,
something Microsoft probably will not do. Microsoft makes and sells
software, including the Windows operating system, patent sharks just
thrive off their patents. Being sued by one of those are far more
likely.
 
M

Maurice LING

Cameron said:
.
.
.



Recent releases of Mac OS build in Python.

Python has been part of Mac OSX since OSX 10.2 (maybe even earlier but
10.2 is the earliest I've used).

ML
 
B

Bill Maxwell

I see...So, if these are the only options, the only "safe" bet is to
install the language on the machine (beeing Win, Linux or Mac)
and execute the .py files, right ??


No, those are not the only options.

Check out PyInstaller: http://pyinstaller.python-hosting.com/


I haven't used the latest versions. But, I've used the old Gordon
McMillan package that PyInstaller is based on, and had good success.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top