[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Linux/Python Issues

Martin Rinehart

2/17/2008 7:38:00 PM

I went to Python.org, DL'd Python 2.5 source code per the usual
inadequate instructions and ran the make files successfully (sort of).
Python 2.5 works fine. But "from Tkinter import *" gets a "What's
Tkinter?" message. IDLE's no where to be found.

What's not in the instructions is what directory should I be in when I
download? Where should I put the ".bz2" file? What dir for running the
make files? At present I'm working on a Windows machine, endangering
what's left of my sanity.

I'm using Linspire, so Debian directories are probably the ones that
will get me up and running. Barring specific knowledge, even some good
guesses would be appreciated.
19 Answers

Paul Boddie

2/17/2008 8:43:00 PM

0

On 17 Feb, 20:38, MartinRineh...@gmail.com wrote:
> I went to Python.org, DL'd Python 2.5 source code per the usual
> inadequate instructions and ran the make files successfully (sort of).
> Python 2.5 works fine. But "from Tkinter import *" gets a "What's
> Tkinter?" message. IDLE's no where to be found.

It could be that you don't have the Tcl/Tk libraries installed, or
perhaps the header files for Tcl/Tk aren't installed. If so, Python
wouldn't detect them when being configured itself, and then you
probably wouldn't have the Tkinter extension installed.

> What's not in the instructions is what directory should I be in when I
> download? Where should I put the ".bz2" file? What dir for running the
> make files? At present I'm working on a Windows machine, endangering
> what's left of my sanity.
>
> I'm using Linspire, so Debian directories are probably the ones that
> will get me up and running. Barring specific knowledge, even some good
> guesses would be appreciated.

Here's one page which probably tells you stuff you already know:

http://wiki.python.org/moin/BeginnersGuid...

On Ubuntu, which is Debian-based, the python-tk package should make
Tkinter available, so you could look for that in your repositories. As
for building from source, you can put the .bz2 file anywhere, and
unpack it anywhere that isn't going to make a mess for you to clean up
later. For example, you could download the Python .bz2 file into a
"downloads" directory residing in your home directory, then you could
do this:

mkdir software
cd software
tar jxf ~/downloads/Python-2.5.1.tar.bz2
cd Python-2.5.1
../configure
make

You can then do a "make install" with the right privileges.

Paul

Diez B. Roggisch

2/17/2008 8:48:00 PM

0

MartinRinehart@gmail.com schrieb:
> I went to Python.org, DL'd Python 2.5 source code per the usual
> inadequate instructions and ran the make files successfully (sort of).
> Python 2.5 works fine. But "from Tkinter import *" gets a "What's
> Tkinter?" message. IDLE's no where to be found.
>
> What's not in the instructions is what directory should I be in when I
> download? Where should I put the ".bz2" file? What dir for running the
> make files? At present I'm working on a Windows machine, endangering
> what's left of my sanity.
>
> I'm using Linspire, so Debian directories are probably the ones that
> will get me up and running. Barring specific knowledge, even some good
> guesses would be appreciated.

Nothing special, just reading the "configure --help" will help you. You
need Tcl/Tk + possible devel-packages so the header-files are found. I'm
not an expert on the required versions, but that should be told you
somewhere.

But I doubt that there isn't a python2.5 already available for your
distro - especially if it's debian based. Ubuntu for example has 2.5 as
default.

Diez

bruno.desthuilliers@gmail.com

2/17/2008 9:09:00 PM

0

On 17 fév, 20:38, MartinRineh...@gmail.com wrote:
(snip)
> What's not in the instructions is what directory should I be in when I
> download? Where should I put the ".bz2" file? What dir for running the
> make files?

Neither are the basic shell commands like cd, tar etc. Nothing Python-
specific here, and I'm afraid you'll have the very same problem with
any source distrib of any oss project. IOW: all this is assumed to be
common *n*x knowledge.

Martin Rinehart

2/18/2008 3:29:00 PM

0



bruno.desthuilliers@gmail.com wrote:
> IOW: all this is assumed to be
> common *n*x knowledge.

Both GNOME and KDE put Windows to shame. An old Windows guy, like me,
can just start using either one without needing 'common *n*x
knowledge.' Too bad the *n*x community isn't more welcoming to
outsiders. Linspire's CNR puts Windows DLs to shame, but Python2.5
isn't there. Ugh.

Martin Rinehart

2/18/2008 3:39:00 PM

0



Paul Boddie wrote:
> Here's one page which probably tells you stuff you already know:
>
> http://wiki.python.org/moin/BeginnersGuid...

Thank you! It says I need Python (which I've got) and the Python-devel
package, which sounds like it might include Tkinter and IDLE. Now if
only I knew where to get the Python-devel package ...

Paul Boddie

2/18/2008 4:16:00 PM

0

On 18 Feb, 16:39, MartinRineh...@gmail.com wrote:
> Paul Boddie wrote:
> > Here's one page which probably tells you stuff you already know:
>
> >http://wiki.python.org/moin/BeginnersGuid...
>
> Thank you! It says I need Python (which I've got) and the Python-devel
> package, which sounds like it might include Tkinter and IDLE. Now if
> only I knew where to get the Python-devel package ...

It would probably be the python-dev package if Linspire really is
based on Debian. However, that only gives you the Python headers, as
far as I remember. You would also need to get the packages for Tcl/Tk
including those providing the headers. And IDLE and Tkinter are
separate packages, too. But generally, just asking for the idle or
idle-python2.5 packages will give you the stack of packages you need
without any further thought required.

That said, if the problem is that Linspire doesn't provide Python 2.5
as a package, then you're back to installing the Tcl/Tk packages and
then building from source, configuring, building and installing Python
as mentioned earlier. You could instead attempt to port the generic
Debian package to Linspire, but this isn't for the timid. ;-)

If finding Tcl/Tk packages is also a problem, you could build Tcl/Tk
from scratch, too - something I've had to do in the distant past on
operating systems like Solaris. Then, it's a matter of telling
Python's configure program where you installed the Tcl/Tk headers and
libraries.

Paul

P.S. I'm not sure if I can advise you on the specifics around
Linspire. Ubuntu and Debian are quite transparent, and you can quite
easily find packages for them on packages.ubuntu.com and
packages.debian.org respectively. The whole CNR stuff and the
proprietary software slant of Linspire obscures the solution, in my
opinion.

Martin Rinehart

2/18/2008 9:25:00 PM

0



Paul Boddie wrote:
> The whole CNR stuff and the
> proprietary software slant of Linspire obscures the solution, in my
> opinion.

Thanks for all your help, Paul.

CNR, which is now free, is absolutely marvelous when it's got what you
need. If Python2.5 were in the warehouse, I'd have clicked, gone to
make a cup of coffee and the appropriate icon would be on my desktop
when I came back. If I were Python.org I'd not consider anything ready
for release until it was in the warehouse.

Diez B. Roggisch

2/18/2008 10:31:00 PM

0

MartinRinehart@gmail.com schrieb:
>
> bruno.desthuilliers@gmail.com wrote:
>> IOW: all this is assumed to be
>> common *n*x knowledge.
>
> Both GNOME and KDE put Windows to shame. An old Windows guy, like me,
> can just start using either one without needing 'common *n*x
> knowledge.' Too bad the *n*x community isn't more welcoming to
> outsiders. Linspire's CNR puts Windows DLs to shame, but Python2.5
> isn't there. Ugh.

I might destroying pink dreams of windows cozyness, but to my knowledge
*compiling* something under windows is at least as hard, if not harder,
than under linux.

As I said - I use ubuntu, and do issue an

apt-get install python2.5

and afterwards I end up with a python2.5 including Tkinter and whatnot.

You deliberately chose to do otherwise, goind the hard way - don't
expect to be your hands being hold.

Diez

Bruno Desthuilliers

2/19/2008 12:56:00 PM

0

MartinRinehart@gmail.com a écrit :
>
> bruno.desthuilliers@gmail.com wrote:
>> IOW: all this is assumed to be
>> common *n*x knowledge.
>
> Both GNOME and KDE put Windows to shame. An old Windows guy, like me,
> can just start using either one without needing 'common *n*x
> knowledge.'

Err... Ever tried to compile them from sources ?-)

> Too bad the *n*x community isn't more welcoming to
> outsiders.

C'mon, Martin, be serious. Compiling softwares from sources requires at
least some minimal 'insider' knowledge *whatever the platform*. You
can't seriously hope each and every source distrib to provide
newbie-oriented doc for what's obviously a power-user operation.

Or do you imply that there should be Windows installations instructions
explaining the concepts of window, mouse, etc ? FWIW, I haven't seen so
far any source distrib of any software targeting the Windows platform
that didn't assume some 'common Windows knowledge'.

You label yourself as "an old Windows guy". This means you have a good
knowledge of this platform. How long did it take to gain this knowledge
? More than a couple weeks, I bet ?

FWIW, "a couple weeks" is the time it took me - coming from Mac then
Windows - to be able to compile Python (or almost any other software)
from sources on linux - and most of this time was spent solving
dependancies issues badly managed by the particular distro I was using
by that time, which wasn't the more standard nor documented one.

So, here's the basic scheme:

- download the source tarball, preferably in /usr/local/src
- unpack it
- cd into the unpacked source directory
- *carefully* read the README, INSTALL and other relevant docs
- run ./configure with the relevant options
- run make
- run make install

Wasn't too hard, was it ?-)

And before you say it: yes indeed, it assumes you know how to use the
command line, navigate your filesystem, copy/move things around, unpack
an archive, read a text file etc... IOW, some more 'common *n*x
knowledge' that you just can't hope to avoid learning if you want to
properly use a *n*x system. Sorry.

Bjoern Schliessmann

2/19/2008 3:47:00 PM

0

MartinRinehart@gmail.com wrote:

> Both GNOME and KDE put Windows to shame. An old Windows guy, like
> me, can just start using either one without needing 'common *n*x
> knowledge.'

Sure, go and compile them from the sources. The X server too, please
(I got half insane from that once).

> Too bad the *n*x community isn't more welcoming to outsiders.

I think the automobile community could be more welcoming to
outsiders either. I just can refill fuel and perhaps change motor
oil, but assembling a car from its components is too hard for me.
Evil automobilers, why do they make it so complicated! 8)

Regards,


Björn

--
BOFH excuse #362:

Plasma conduit breach