Python deployment options.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • king kikapu

    Python deployment options.


    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

  • Chris_147

    #2
    Re: Python deployment options.

    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:


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

    Comment

    • king kikapu

      #3
      Re: Python deployment options.


      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" <chris.van.b... @gmail.comwrote :
      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....frm/thread/bcc...
      >
      I doubt Microsoft will unleash their lawyers on you, but it is a
      problem.

      Comment

      • Richard Charts

        #4
        Re: Python deployment options.


        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.

        Comment

        • Cameron Laird

          #5
          Re: Python deployment options.

          In article <1162990156.204 577.198720@h48g 2000cwc.googleg roups.com>,
          Richard Charts <richard.charts @gmail.comwrote :

          Comment

          • Fuzzyman

            #6
            Re: Python deployment options.


            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:

            >
            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


            Comment

            • Larry Bates

              #7
              Re: Python deployment options.

              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" <chris.van.b... @gmail.comwrote :
              >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....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

              Comment

              • sturlamolden

                #8
                Re: Python deployment options.

                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.

                Comment

                • Maurice LING

                  #9
                  Re: Python deployment options.

                  Cameron Laird wrote:
                  In article <1162990156.204 577.198720@h48g 2000cwc.googleg roups.com>,
                  Richard Charts <richard.charts @gmail.comwrote :
                  .
                  .
                  .
                  >
                  >>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

                  Comment

                  • Bill Maxwell

                    #10
                    Re: Python deployment options.

                    On 8 Nov 2006 03:42:09 -0800, "king kikapu" <aboudouvas@pan afonet.gr>
                    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.


                    Comment

                    Working...