I'm just starting to learn python and am trying to install a module named pySerial. http://pyserial.sourceforge.net/ Installation details provided from the above site:- ------------------------------------------------------------- Extract files from the archive, open a shell/console in that directory and let Distutils do the rest: python setup.py install The files get installed in the "Lib/site-packages" directory. -------------------------------------------------------------- When I run the above command I get the following:- merlin:/home/graham/tmp/pyserial-2.0b2 # python setup.py install error in setup script: invalid distribution option 'classifiers' merlin:/home/graham/tmp/pyserial-2.0b2 # Just wondering what I'm doing wrong or is the setup script at fault, if so how can I manually install the above module? -- Regards, Graham Smith ---------------------------------------------------------
When I run the above command I get the following:- merlin:/home/graham/tmp/pyserial-2.0b2 # python setup.py install error in setup script: invalid distribution option 'classifiers' merlin:/home/graham/tmp/pyserial-2.0b2 #
Just wondering what I'm doing wrong or is the setup script at fault, if so how can I manually install the above module?
Nope, you're doing it right. It should be that easy. I've had problems like this when installing Python modules. In each case a small tweak to the setup script has been required. I'm not sure why these things go wrong. At first I blamed the packager, but after I saw it happen 2 or 3 times I decided that perhaps the installation mechanism is just not as robust as, say, Perl's. Either get your nose into the script and hope it's something obvious, or contact the module maintainer. --
eatapple core dump
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 07 November 2003 03:22 am, Derek Fountain wrote:
When I run the above command I get the following:- merlin:/home/graham/tmp/pyserial-2.0b2 # python setup.py install error in setup script: invalid distribution option 'classifiers' merlin:/home/graham/tmp/pyserial-2.0b2 #
...snip...
I'm not sure why these things go wrong. At first I blamed the packager, but after I saw it happen 2 or 3 times I decided that perhaps the installation mechanism is just not as robust as, say, Perl's.
Really it depends on the version of Distutils/Python and what the author expects. Distutils doesn't change very often. In this case it's the author's fault. Read the bottom of this message (The first Google result for "distutils classifiers"): http://mail.python.org/pipermail/distutils-sig/2003-February/003188.html As for the robustness comment, I really have to disagree. Your average setup.py is much simpler than your average Makefile.PL. The setup.py also does a lot of stuff that Makefile.PL doesn't. Try 'python setup.py bdist_rpm' or 'python setup.py bdist_wininst' sometime. The wininst one freaked me out when I first learned of it. I ran it on my Linux box and it generated a "wizard" installer for Windows. You may also want to compare the spec files for Perl and Python modules under SuSE. The python ones are *much* simpler thanks to the --root and --record options. - -- James Oakley Engineering - SolutionInc Ltd. joakley@solutioninc.com http://www.solutioninc.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE/q/Yu+FOexA3koIgRAgG7AJ43e3l1aS7uBQjqxc6lTPPe3WMBIACglmI3 lKhS2mNX/DiOsQoXPxFxmOo= =Z0UG -----END PGP SIGNATURE-----
As for the robustness comment, I really have to disagree.
Well, I immediately bow to your greater knowledge as a packager, James. I was speaking from personal experience, rather than a knowledge of hard facts. I have installed hundreds of Perl packages on Linux and other UNIX platforms, and apart from C code compilation issues on AIX-4.x (which is always a bugger) I've never had one fail. Since getting into Python a few weeks back, I've installed about 5 packages on Linux, and I've had to tweak 2 of them. The OP's comments make that 3 out of 6 problem installations that I know of - not a good performance. If you say the Python installations do more with less, I believe you. It just seems, from the evidence I have so far, that they don't do it as well. --
eatapple core dump
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 07 November 2003 08:59 pm, Derek Fountain wrote:
As for the robustness comment, I really have to disagree.
Well, I immediately bow to your greater knowledge as a packager, James. I was speaking from personal experience, rather than a knowledge of hard facts. I have installed hundreds of Perl packages on Linux and other UNIX platforms, and apart from C code compilation issues on AIX-4.x (which is always a bugger) I've never had one fail.
Try under 9.0. Threading is now enabled under SuSE's build of Perl and a lot of extension modules are broken.
Since getting into Python a few weeks back, I've installed about 5 packages on Linux, and I've had to tweak 2 of them. The OP's comments make that 3 out of 6 problem installations that I know of - not a good performance.
Sometimes, not often, I find that the MANIFEST or MANIFEST.in is not up to date. I have to fix that. I've also found that some module authors try to extend the distutils incorrectly, simply because they don't know how to use it. Really, module authors should be generating source distributions with 'python setup.py sdist' rather than tar. That will catch common errors. If sdist works, everything else should work fine. Even then, I distribute 29 Python modules at ftp.funktronics.ca and maybe 1 or 2 have given me trouble. Maybe we're all talking about the same packages? (except that serial module, which I've never used)
If you say the Python installations do more with less, I believe you. It just seems, from the evidence I have so far, that they don't do it as well.
If anything goes wrong with a Perl or Python module, submit a bug to the author. Alternatively, contact me at jfunk@funktronics.ca and I'll try to build an RPM for you. Actually, that goes for any piece of software. I find some good software I haven't heard of in this way. (Richard Bos requested XSH, which I now use at work) - -- James Oakley Engineering - SolutionInc Ltd. joakley@solutioninc.com http://www.solutioninc.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE/r+x8+FOexA3koIgRAg0gAKCqo6uottNyQkRfPTX0Hb+TYrCHnQCbBrdb BkLLJDoBfFjm7JRe/AeO+sM= =w6+2 -----END PGP SIGNATURE-----
On Fri, 7 Nov 2003 18:22, Derek Fountain wrote:
When I run the above command I get the following:- merlin:/home/graham/tmp/pyserial-2.0b2 # python setup.py install error in setup script: invalid distribution option 'classifiers' merlin:/home/graham/tmp/pyserial-2.0b2 #
Just wondering what I'm doing wrong or is the setup script at fault, if so how can I manually install the above module?
Nope, you're doing it right. It should be that easy. I've had problems like this when installing Python modules. In each case a small tweak to the setup script has been required.
I'm not sure why these things go wrong. At first I blamed the packager, but after I saw it happen 2 or 3 times I decided that perhaps the installation mechanism is just not as robust as, say, Perl's.
Either get your nose into the script and hope it's something obvious, or contact the module maintainer.
Well to answer my own problem. I bit the bullet and installed SuSE 9.0 today and the module installs with out a problem. So it appears that the latter version of python did the trick. Boy it takes some time to get all the configs up to scratch so that all the programs I had previously installed work the same on SuSE 9.0. -- Regards, Graham Smith ---------------------------------------------------------
participants (3)
-
Derek Fountain
-
Graham Smith
-
James Oakley