Python deployment options.

Discussion in 'Python' started by king kikapu, Nov 8, 2006.

  1. king kikapu

    king kikapu Guest

    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
    king kikapu, Nov 8, 2006
    #1
    1. Advertising

  2. king kikapu

    Chris_147 Guest

    king kikapu wrote:
    > 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.
    Chris_147, Nov 8, 2006
    #2
    1. Advertising

  3. king kikapu

    king kikapu Guest

    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 ??


    On Nov 8, 1:24 pm, "Chris_147" <> wrote:
    > king kikapu wrote:
    > > 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 kikapuWell, 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.lang.python/browse_frm/thread/bcc...
    >
    > I doubt Microsoft will unleash their lawyers on you, but it is a
    > problem.
    king kikapu, Nov 8, 2006
    #3
  4. king kikapu wrote:
    > 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.
    Richard Charts, Nov 8, 2006
    #4
  5. In article <>,
    Richard Charts <> wrote:
    .
    .
    .
    >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.
    Cameron Laird, Nov 8, 2006
    #5
  6. king kikapu

    Fuzzyman Guest

    Chris_147 wrote:
    > king kikapu wrote:
    > > 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 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
    Fuzzyman, Nov 8, 2006
    #6
  7. king kikapu

    Larry Bates Guest

    king kikapu wrote:
    > 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 ??
    >
    >
    > On Nov 8, 1:24 pm, "Chris_147" <> wrote:
    >> king kikapu wrote:
    >>> 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 kikapuWell, 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.lang.python/browse_frm/thread/bcc...
    >>
    >> I doubt Microsoft will unleash their lawyers on you, but it is a
    >> problem.

    >


    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
    Larry Bates, Nov 8, 2006
    #7
  8. king kikapu

    sturlamolden Guest

    Fuzzyman wrote:

    > 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.
    sturlamolden, Nov 8, 2006
    #8
  9. king kikapu

    Maurice LING Guest

    Cameron Laird wrote:

    > In article <>,
    > Richard Charts <> wrote:
    > .
    > .
    > .
    >
    >>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.


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

    ML
    Maurice LING, Nov 15, 2006
    #9
  10. king kikapu

    Bill Maxwell Guest

    On 8 Nov 2006 03:42:09 -0800, "king kikapu" <>
    wrote:

    >
    >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.
    Bill Maxwell, Nov 16, 2006
    #10
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cliff  Martin
    Replies:
    1
    Views:
    3,013
    Larry Smith
    Jan 31, 2007
  2. jacksu
    Replies:
    0
    Views:
    492
    jacksu
    Oct 9, 2007
  3. Utkado
    Replies:
    2
    Views:
    2,036
  4. Bryan Richardson
    Replies:
    6
    Views:
    265
    Bryan Richardson
    Feb 25, 2008
  5. Sijo Kg
    Replies:
    1
    Views:
    87
    Justin Collins
    Jan 7, 2009
Loading...

Share This Page