I am not able to setup pydb2 ! Any help !

V

vj

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

Traceback (most recent call last):
File "C:\vijay\db2\utils\PyDB2-1.1.0-2.tar\PyDB2-1.1.0\setup.py",
line 57, in -toplevel-
libraries=[ db2lib ],
File "C:\Python24\lib\distutils\core.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.

Thanks in advance.

Vj
 
V

vincent wehren

| When I run the setup.py script , it throws an error
|
| Traceback (most recent call last):
| File "C:\vijay\db2\utils\PyDB2-1.1.0-2.tar\PyDB2-1.1.0\setup.py",
| line 57, in -toplevel-
| libraries=[ db2lib ],
| File "C:\Python24\lib\distutils\core.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
|
 
R

Robert Kern

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

Traceback (most recent call last):
File "C:\vijay\db2\utils\PyDB2-1.1.0-2.tar\PyDB2-1.1.0\setup.py",
line 57, in -toplevel-
libraries=[ db2lib ],
File "C:\Python24\lib\distutils\core.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 have to give it a command. You probably want

python setup.py install

--
Robert Kern
(e-mail address removed)

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

vj

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.
 
V

vincent wehren

|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\utils\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..
 
V

vj

Unfortunately I get another error

Your DB2 root is: C:\Program Files\IBM\SQLLIB\
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.
 
V

vincent wehren

| Unfortunately I get another error
|
| Your DB2 root is: C:\Program Files\IBM\SQLLIB\
| 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,
 
S

Scott David Daniels

vincent said:
| Unfortunately I get another error
|
| Your DB2 root is: C:\Program Files\IBM\SQLLIB\
| 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).

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
(e-mail address removed)
 
F

Fredrik Lundh

Scott said:
MS is fairly determined to get you develop money; you may not
redistribute the C runtime with your app from the "free" stuff.

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 "distributor" 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>
 
S

Scott David Daniels

Fredrik said:
Scott said:
MS is fairly determined to get you develop money; you may not
redistribute the C runtime with your app from the "free" stuff.

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]....

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
(e-mail address removed)
 

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,744
Messages
2,569,481
Members
44,900
Latest member
Nell636132

Latest Threads

Top