I am not able to setup pydb2 ! Any help !

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

    #1

    I am not able to setup pydb2 ! Any help !

    When I run the setup.py script , it throws an error

    Traceback (most recent call last):
    File "C:\vijay\db2\u tils\PyDB2-1.1.0-2.tar\PyDB2-1.1.0\setup.py" ,
    line 57, in -toplevel-
    libraries=[ db2lib ],
    File "C:\Python24\li b\distutils\cor e.py", line 137, in setup
    raise SystemExit, gen_usage(dist. script_name) + "\nerror: %s" % msg
    SystemExit: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2
    [cmd2_opts] ...]
    or: setup.py --help [cmd1 cmd2 ...]
    or: setup.py --help-commands
    or: setup.py cmd --help

    error: no commands supplied[color=blue][color=green][color=darkred]
    >>>[/color][/color][/color]

    Please let me know , what should have been the issue.

    Thanks in advance.

    Vj

  • vincent wehren

    #2
    Re: I am not able to setup pydb2 ! Any help !


    "vj" <vijaykarthick@ gmail.com> schrieb im Newsbeitrag
    news:1127321226 .420209.253360@ g43g2000cwa.goo glegroups.com.. .
    | When I run the setup.py script , it throws an error
    |
    | Traceback (most recent call last):
    | File "C:\vijay\db2\u tils\PyDB2-1.1.0-2.tar\PyDB2-1.1.0\setup.py" ,
    | line 57, in -toplevel-
    | libraries=[ db2lib ],
    | File "C:\Python24\li b\distutils\cor e.py", line 137, in setup
    | raise SystemExit, gen_usage(dist. script_name) + "\nerror: %s" % msg
    | SystemExit: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2
    | [cmd2_opts] ...]
    | or: setup.py --help [cmd1 cmd2 ...]
    | or: setup.py --help-commands
    | or: setup.py cmd --help
    |
    | error: no commands supplied
    | >>>
    |
    | Please let me know , what should have been the issue.

    You need to say "setup.py install" instead of just setup.py

    HTH,
    --

    Vincent Wehren

    |
    | Thanks in advance.
    |
    | Vj
    |


    Comment

    • vj

      #3
      Re: I am not able to setup pydb2 ! Any help !

      I am new to Python . Please let me where should I issue the command
      "setup.py install".

      I have been using the IDLE to run Python scripts.

      Comment

      • Robert Kern

        #4
        Re: I am not able to setup pydb2 ! Any help !

        vj wrote:[color=blue]
        > When I run the setup.py script , it throws an error
        >
        > Traceback (most recent call last):
        > File "C:\vijay\db2\u tils\PyDB2-1.1.0-2.tar\PyDB2-1.1.0\setup.py" ,
        > line 57, in -toplevel-
        > libraries=[ db2lib ],
        > File "C:\Python24\li b\distutils\cor e.py", line 137, in setup
        > raise SystemExit, gen_usage(dist. script_name) + "\nerror: %s" % msg
        > SystemExit: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2
        > [cmd2_opts] ...]
        > or: setup.py --help [cmd1 cmd2 ...]
        > or: setup.py --help-commands
        > or: setup.py cmd --help
        >
        > error: no commands supplied
        >
        >
        > Please let me know , what should have been the issue.[/color]

        You have to give it a command. You probably want

        python setup.py install

        --
        Robert Kern
        rkern@ucsd.edu

        "In the fields of hell where the grass grows high
        Are the graves of dreams allowed to die."
        -- Richard Harter

        Comment

        • vincent wehren

          #5
          Re: I am not able to setup pydb2 ! Any help !

          "vj" <vijaykarthick@ gmail.com> schrieb im Newsbeitrag
          news:1127321993 .065940.242530@ g49g2000cwa.goo glegroups.com.. .
          |I am new to Python . Please let me where should I issue the command
          | "setup.py install".
          |
          | I have been using the IDLE to run Python scripts.

          You need to open the command prompt (e.g. by entering "cmd" in the "Run"
          input box). Now enter "cd C:\vijay\db2\ut ils\PyDB2-1.1.0-2.tar\PyDB2-1.1.0"
          to get into the right directory. Now enter "setup.py install" and you should
          be all set..

          --
          Vincent




          Comment

          • vj

            #6
            Re: I am not able to setup pydb2 ! Any help !

            Unfortunately I get another error

            Your DB2 root is: C:\Program Files\IBM\SQLLI B\
            running install
            running build
            running build_py
            creating build
            creating build\lib.win32-2.4
            copying DB2.py -> build\lib.win32-2.4
            running build_ext
            error: The .NET Framework SDK needs to be installed before building
            extensions f
            or Python.

            Comment

            • vincent wehren

              #7
              Re: I am not able to setup pydb2 ! Any help !

              "vj" <vijaykarthick@ gmail.com> schrieb im Newsbeitrag
              news:1127322750 .143775.92010@g 44g2000cwa.goog legroups.com...
              | Unfortunately I get another error
              |
              | Your DB2 root is: C:\Program Files\IBM\SQLLI B\
              | running install
              | running build
              | running build_py
              | creating build
              | creating build\lib.win32-2.4
              | copying DB2.py -> build\lib.win32-2.4
              | running build_ext
              | error: The .NET Framework SDK needs to be installed before building
              | extensions f
              | or Python.

              You need the same compiler Python 2.4 was compiled with to compile CPython
              extensions from source. Alternatively, you might look into getting some
              precompiled Windows Binaries for pydb2 (try Googling for them or the pyDB2
              mailing list).

              HTH,
              --

              Vincent Wehren


              Comment

              • Scott David Daniels

                #8
                Re: I am not able to setup pydb2 ! Any help !

                vincent wehren wrote:[color=blue]
                > "vj" <vijaykarthick@ gmail.com> schrieb im Newsbeitrag
                > news:1127322750 .143775.92010@g 44g2000cwa.goog legroups.com...
                > | Unfortunately I get another error
                > |
                > | Your DB2 root is: C:\Program Files\IBM\SQLLI B\
                > | running install
                > | running build
                > | running build_py
                > | creating build
                > | creating build\lib.win32-2.4
                > | copying DB2.py -> build\lib.win32-2.4
                > | running build_ext
                > | error: The .NET Framework SDK needs to be installed before building
                > | extensions f
                > | or Python.
                >
                > You need the same compiler Python 2.4 was compiled with to compile CPython
                > extensions from source. Alternatively, you might look into getting some
                > precompiled Windows Binaries for pydb2 (try Googling for them or the pyDB2
                > mailing list).[/color]

                Actually, "the same" is not necessary on Windows; you need a
                "compatible " compiler. MinGW, MS VC, and Intel's compiler are all
                "compatible " The big trick is that Python 2.4 switched versions,
                and was built with VC 7.1 (previous Windows python editions were
                built with 6.0). So you need either VC 7.1, the ".Net" C compiler
                available for direct download from MS (actually you need two large
                downloads, but you may not "pass them around" after downloading),
                a 7.1-compatible version for the Intel compiler, or a MinGW compiler
                compatible with the 7.1 runtimes. Note, this switch of compilers was
                based in part on the fact that there is no longer any way to legally
                buy a VC 6.0 compiler; MS no longer sells that version. At least you
                either buy the 7.1 compiler or download the packages yourself.

                I have managed to get the VC stuff from the download to work, but I did
                it in part by hacking the distutils code in Python 2.4. I presume
                that over time, we will get better about this. Also note, if you
                do intend to build products for delivery to customers on Windows,
                MS is fairly determined to get you develop money; you may not
                redistribute the C runtime with your app from the "free" stuff.
                If you pay the fee for 7.1, you can get the redistribution rights.
                However, by installing Python 2.4 on the customer machine, you
                will have installed a working VC runtime. The official Python 2.4
                windows distribution, ActiveState's Python distribution, and probably
                a few other distributions all will install the VC runtime if necessary,
                and are built by people with the right to redistribute it. So, at the
                cost of a two-step install, you can legally build and distribute Python
                2.4 apps.

                In case you don't know: I am not a lawyer; don't regard my guesses about
                the legal status of things as definitive; don't base a business model on
                this without consulting a lawyer; your mileage may vary; objects in the
                mirror may be closer than they appear.

                --Scott David Daniels
                Scott.Daniels@A cm.Org

                Comment

                • Fredrik Lundh

                  #9
                  Re: I am not able to setup pydb2 ! Any help !

                  Scott David Daniels wrote:
                  [color=blue]
                  > MS is fairly determined to get you develop money; you may not
                  > redistribute the C runtime with your app from the "free" stuff.[/color]

                  that's a myth, based on a flawed reading of the MS license. to repeat
                  myself from various other fora:

                  "As long as you're using a standard Python build, you don't need to buy
                  VC7 to [legally redistribute the C runtime]. The python.org team uses a
                  properly licensed VC7 to build Python, which turns Python into "licensee
                  software" and you into a "distributo r" doing "further distribution" of Python
                  to end users (with your own stuff added on top, of course). And further
                  distribution is perfectly okay, as long as you only ship the MS components
                  together with proper "licensee software" (=Python), and that all parties
                  respect the relevant portions of the original EULA (this basically means
                  that you cannot use tricks to circumvent the MS EULA, e.g. by attempting
                  to relicense the MS DLL's under less restrictive licenses or "viral" licenses.
                  The same applies to all other licensed components, of course. You cannot
                  relicense the Python core either.)."
                  "(If in doubt, consult a real lawyer. If you do, make sure that he/she under-
                  stands the various levels here -- i.e. that "you" in the MS EULA applies to
                  the Python developers, not yourself)."

                  </F>



                  Comment

                  • Scott David Daniels

                    #10
                    Re: I am not able to setup pydb2 ! Any help !

                    Fredrik Lundh wrote:[color=blue]
                    > Scott David Daniels wrote:
                    >[color=green]
                    >>MS is fairly determined to get you develop money; you may not
                    >>redistribut e the C runtime with your app from the "free" stuff.[/color]
                    >
                    > that's a myth, based on a flawed reading of the MS license. to repeat
                    > myself from various other fora:
                    >
                    > As long as you're using a standard Python build, you don't need to buy
                    > VC7 to [legally redistribute the C runtime]....[/color]

                    Thanks for correcting me here. I did try and give a flavor of that by
                    saying that, if you installed a Python installation from a standard
                    source you were OK, but this helps elucidate it.

                    --Scott David Daniels
                    Scott.Daniels@A cm.Org

                    Comment

                    Working...