By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,364 Members | 1,518 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,364 IT Pros & Developers. It's quick & easy.

I am not able to setup pydb2 ! Any help !

P: n/a
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

Sep 21 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a

"vj" <vi***********@gmail.com> schrieb im Newsbeitrag
news:11**********************@g43g2000cwa.googlegr oups.com...
| 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
|
Sep 21 '05 #2

P: n/a
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.

Sep 21 '05 #3

P: n/a
vj wrote:
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
rk***@ucsd.edu

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

Sep 21 '05 #4

P: n/a
"vj" <vi***********@gmail.com> schrieb im Newsbeitrag
news:11**********************@g49g2000cwa.googlegr oups.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\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..

--
Vincent


Sep 21 '05 #5

P: n/a
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.

Sep 21 '05 #6

P: n/a
"vj" <vi***********@gmail.com> schrieb im Newsbeitrag
news:11*********************@g44g2000cwa.googlegro ups.com...
| 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,
--

Vincent Wehren
Sep 21 '05 #7

P: n/a
vincent wehren wrote:
"vj" <vi***********@gmail.com> schrieb im Newsbeitrag
news:11*********************@g44g2000cwa.googlegro ups.com...
| 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
Sc***********@Acm.Org
Sep 21 '05 #8

P: n/a
Scott David Daniels wrote:
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>

Sep 21 '05 #9

P: n/a
Fredrik Lundh wrote:
Scott David Daniels wrote:
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
Sc***********@Acm.Org
Sep 21 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.