Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #43916 > unrolled thread

Ubuntu package "python3" does not include tkinter

Started bylcrocker <lee@piclab.com>
First post2013-04-19 10:17 -0700
Last post2013-04-20 00:05 +0000
Articles 20 on this page of 44 — 13 participants

Back to article view | Back to comp.lang.python


Contents

  Ubuntu package "python3" does not include tkinter lcrocker <lee@piclab.com> - 2013-04-19 10:17 -0700
    Re: Ubuntu package "python3" does not include tkinter Joel Goldstick <joel.goldstick@gmail.com> - 2013-04-19 13:25 -0400
      Re: Ubuntu package "python3" does not include tkinter lcrocker <leedanielcrocker@gmail.com> - 2013-04-19 10:30 -0700
    Re: Ubuntu package "python3" does not include tkinter Andrew Berg <bahamutzero8825@gmail.com> - 2013-04-19 12:35 -0500
      Re: Ubuntu package "python3" does not include tkinter lcrocker <leedanielcrocker@gmail.com> - 2013-04-19 10:42 -0700
        Re: Ubuntu package "python3" does not include tkinter rusi <rustompmody@gmail.com> - 2013-04-19 10:53 -0700
        Re: Ubuntu package "python3" does not include tkinter Andrew Berg <bahamutzero8825@gmail.com> - 2013-04-19 13:05 -0500
        Re: Ubuntu package "python3" does not include tkinter Sibylle Koczian <nulla.epistola@web.de> - 2013-04-20 18:10 +0200
          Re: Ubuntu package "python3" does not include tkinter Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-22 03:57 +0000
            Re: Ubuntu package "python3" does not include tkinter rusi <rustompmody@gmail.com> - 2013-04-21 21:10 -0700
            Re: Ubuntu package "python3" does not include tkinter Andrew Berg <bahamutzero8825@gmail.com> - 2013-04-21 23:24 -0500
              Re: Ubuntu package "python3" does not include tkinter rusi <rustompmody@gmail.com> - 2013-04-21 21:34 -0700
                Re: Ubuntu package "python3" does not include tkinter Andrew Berg <bahamutzero8825@gmail.com> - 2013-04-22 00:13 -0500
            Re: Ubuntu package "python3" does not include tkinter Rui Maciel <rui.maciel@gmail.com> - 2013-04-22 07:36 +0100
              Re: Ubuntu package "python3" does not include tkinter Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-22 07:17 +0000
                Re: Ubuntu package "python3" does not include tkinter Andrew Berg <bahamutzero8825@gmail.com> - 2013-04-22 03:08 -0500
                  Re: Ubuntu package "python3" does not include tkinter Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-22 09:18 +0000
                    Re: Ubuntu package "python3" does not include tkinter Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-04-22 14:52 +0200
                      Re: Ubuntu package "python3" does not include tkinter Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-23 00:22 +0000
                        Re: Ubuntu package "python3" does not include tkinter Chris Angelico <rosuav@gmail.com> - 2013-04-23 10:36 +1000
                          Re: Ubuntu package "python3" does not include tkinter Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-23 04:03 +0000
                            Re: Ubuntu package "python3" does not include tkinter Chris Angelico <rosuav@gmail.com> - 2013-04-23 14:11 +1000
                        Re: Ubuntu package "python3" does not include tkinter Andrew Berg <bahamutzero8825@gmail.com> - 2013-04-22 19:47 -0500
                          Re: Ubuntu package "python3" does not include tkinter Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-23 05:49 +0000
                            Re: Ubuntu package "python3" does not include tkinter Andrew Berg <bahamutzero8825@gmail.com> - 2013-04-23 02:33 -0500
                        Re: Ubuntu package "python3" does not include tkinter rusi <rustompmody@gmail.com> - 2013-04-22 20:50 -0700
                        Re: Ubuntu package "python3" does not include tkinter Rui Maciel <rui.maciel@gmail.com> - 2013-04-23 07:57 +0100
                Re: Ubuntu package "python3" does not include tkinter Rui Maciel <rui.maciel@gmail.com> - 2013-04-22 22:09 +0100
                  Re: Ubuntu package "python3" does not include tkinter Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-22 23:30 +0000
                    Re: Ubuntu package "python3" does not include tkinter Rui Maciel <rui.maciel@gmail.com> - 2013-04-23 07:44 +0100
                      Re: Ubuntu package "python3" does not include tkinter rusi <rustompmody@gmail.com> - 2013-04-23 05:01 -0700
                Re: Ubuntu package "python3" does not include tkinter Bob Martin <bob.martin@excite.com> - 2013-04-23 07:33 +0100
                  Re: Ubuntu package "python3" does not include tkinter Chris Angelico <rosuav@gmail.com> - 2013-04-23 16:41 +1000
                    Re: Ubuntu package "python3" does not include tkinter Rui Maciel <rui.maciel@gmail.com> - 2013-04-23 07:48 +0100
                      Re: Ubuntu package "python3" does not include tkinter Chris Angelico <rosuav@gmail.com> - 2013-04-23 17:34 +1000
              Re: Ubuntu package "python3" does not include tkinter lcrocker <leedanielcrocker@gmail.com> - 2013-04-22 04:18 -0700
                Re: Ubuntu package "python3" does not include tkinter rusi <rustompmody@gmail.com> - 2013-04-22 05:08 -0700
                Re: Ubuntu package "python3" does not include tkinter Chris Angelico <rosuav@gmail.com> - 2013-04-22 23:07 +1000
                Re: Ubuntu package "python3" does not include tkinter Rui Maciel <rui.maciel@gmail.com> - 2013-04-22 22:00 +0100
        Re: Ubuntu package "python3" does not include tkinter Rui Maciel <rui.maciel@gmail.com> - 2013-04-22 07:35 +0100
          Re: Ubuntu package "python3" does not include tkinter rusi <rustompmody@gmail.com> - 2013-04-22 04:16 -0700
    Re: Ubuntu package "python3" does not include tkinter Peter Otten <__peter__@web.de> - 2013-04-19 19:53 +0200
    Re: Ubuntu package "python3" does not include tkinter Terry Jan Reedy <tjreedy@udel.edu> - 2013-04-19 14:42 -0400
    Re: Ubuntu package "python3" does not include tkinter Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-20 00:05 +0000

Page 2 of 3 — ← Prev page 1 [2] 3  Next page →


#44138

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2013-04-23 04:03 +0000
Message-ID<51760802$0$29872$c3e8da3$5496439d@news.astraweb.com>
In reply to#44128
On Tue, 23 Apr 2013 10:36:38 +1000, Chris Angelico wrote:

> On Tue, Apr 23, 2013 at 10:22 AM, Steven D'Aprano
> <steve+comp.lang.python@pearwood.info> wrote:
>> It's only when I actually try to do something that requires an X
>> display that it will fail. I won't show the entire traceback, because
>> it is long and not particularly enlightening, but the final error
>> message explains exactly why it isn't working:
>>
>> _tkinter.TclError: no display name and no $DISPLAY environment variable
> 
> You presumably have a system to test this on. Can you try using ssh -X
> to get to it, and then retry that action? It looks like you actually
> have everything you need, just no display... which is exactly what you'd
> get if you ssh to something that has a real GUI. Not a dependency
> problem.

I didn't say it was a dependency problem. I'm just demonstrating that it 
is possible for tkinter code to fail even if all the dependencies are 
met; and on the other hand, it is useful to be able to import tkinter 
even if you cannot display any tkinter windows.


-- 
Steven

[toc] | [prev] | [next] | [standalone]


#44140

FromChris Angelico <rosuav@gmail.com>
Date2013-04-23 14:11 +1000
Message-ID<mailman.950.1366690307.3114.python-list@python.org>
In reply to#44138
On Tue, Apr 23, 2013 at 2:03 PM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
> On Tue, 23 Apr 2013 10:36:38 +1000, Chris Angelico wrote:
>
>> On Tue, Apr 23, 2013 at 10:22 AM, Steven D'Aprano
>> <steve+comp.lang.python@pearwood.info> wrote:
>>> It's only when I actually try to do something that requires an X
>>> display that it will fail. I won't show the entire traceback, because
>>> it is long and not particularly enlightening, but the final error
>>> message explains exactly why it isn't working:
>>>
>>> _tkinter.TclError: no display name and no $DISPLAY environment variable
>>
>> You presumably have a system to test this on. Can you try using ssh -X
>> to get to it, and then retry that action? It looks like you actually
>> have everything you need, just no display... which is exactly what you'd
>> get if you ssh to something that has a real GUI. Not a dependency
>> problem.
>
> I didn't say it was a dependency problem. I'm just demonstrating that it
> is possible for tkinter code to fail even if all the dependencies are
> met; and on the other hand, it is useful to be able to import tkinter
> even if you cannot display any tkinter windows.

Sure. But I don't know that the situation you're seeing is the same as
the one you'd see if you install tkinter without tk.

ChrisA

[toc] | [prev] | [next] | [standalone]


#44129

FromAndrew Berg <bahamutzero8825@gmail.com>
Date2013-04-22 19:47 -0500
Message-ID<mailman.943.1366678054.3114.python-list@python.org>
In reply to#44126
On 2013.04.22 19:22, Steven D'Aprano wrote:
> It's only when I actually try to do something that requires an X display 
> that it will fail. I won't show the entire traceback, because it is long 
> and not particularly enlightening, but the final error message explains 
> exactly why it isn't working:
> 
> _tkinter.TclError: no display name and no $DISPLAY environment variable
So you want to go from "this won't work because it's not installed" to "this won't work, and it there could be a hundred different reasons
why"? tkinter's main function is to display something on a display. To say that displaying something is an optional feature is absurd.
"You can install this, but your package manager won't pull in any dependencies because a few minor things will work without them. If you
want it to actually do what it was made for, you need to install them yourself." Much bigger problem than the OP's, no?

-- 
CPython 3.3.1 | Windows NT 6.2.9200 / FreeBSD 9.1

[toc] | [prev] | [next] | [standalone]


#44143

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2013-04-23 05:49 +0000
Message-ID<517620d4$0$29872$c3e8da3$5496439d@news.astraweb.com>
In reply to#44129
On Mon, 22 Apr 2013 19:47:26 -0500, Andrew Berg wrote:

> On 2013.04.22 19:22, Steven D'Aprano wrote:
>> It's only when I actually try to do something that requires an X
>> display that it will fail. I won't show the entire traceback, because
>> it is long and not particularly enlightening, but the final error
>> message explains exactly why it isn't working:
>> 
>> _tkinter.TclError: no display name and no $DISPLAY environment variable
>
> So you want to go from "this won't work because it's not installed" to
> "this won't work, and it there could be a hundred different reasons
> why"? 

No, that's not what I said. I want to go from:

"this won't work because it's not installed, and I have no idea how to 
install it or what dependencies are needed, and even when I meet all the 
dependencies and install it, it might still not work"

to:

"this won't work, and here are the reasons why".


Splitting tkinter out into an extra package doesn't buy you much, if 
anything. Here is the error I get on Debian when I try importing tkinter:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.1/tkinter/__init__.py", line 42, in <module>
    raise ImportError(str(msg) + ', please install the python-tk package')
ImportError: No module named _tkinter, please install the python-tk 
package


This implies that the pure Python parts of tkinter are already installed. 
It's just the magic _tkinter module which isn't included.

(Also, many points for actually telling me what I need to do to fix the 
problem.)


> tkinter's main function is to display something on a display. To
> say that displaying something is an optional feature is absurd.

Of course it is optional. Python will run on headless systems, or before 
X starts up, or on systems where there is no X. Importing tkinter works 
before X starts up. There's *no reason why* importing tkinter ought to 
fail before X starts up. Obviously you cannot display an X window without 
X, well duh, but merely importing tkinter doesn't require an X display.


> "You can
> install this, but your package manager won't pull in any dependencies
> because a few minor things will work without them. If you want it to
> actually do what it was made for, you need to install them yourself."
> Much bigger problem than the OP's, no?

Not necessarily bigger, just different.

I don't see why "apt-get install python-tk" is considered too trivial to 
worry about, but "apt-get install tcl" is considered a "much bigger 
problem". So long as the error tells you what to do, they're both more or 
less equally hard. Or easy. 

We agree on the conditions needed to display tkinter GUI windows:

- you must have Python
- and the tkinter package
- and the _tkinter module
- and Tk/Tcl
- and X

(and an OS, and a computer, and electricity, but we can take them as 
given).

We just disagree on where to break the packages up. Debian appears to do 
this:

(Python tkinter) (_tkinter) (Tk/Tcl) (X)


Ubuntu appears to do this, I think:

(Python) (tkinter _tkinter) (Tk/Tcl) (X)

I'm suggesting there's no real harm in doing this:

(Python tkinter _tkinter) (Tk/Tcl) (X)


for standard desktop installs, and some minor advantages.


-- 
Steven

[toc] | [prev] | [next] | [standalone]


#44161

FromAndrew Berg <bahamutzero8825@gmail.com>
Date2013-04-23 02:33 -0500
Message-ID<mailman.961.1366702433.3114.python-list@python.org>
In reply to#44143
On 2013.04.23 00:49, Steven D'Aprano wrote:
>  Obviously you cannot display an X window without 
> X, well duh, but merely importing tkinter doesn't require an X display.
Importing it doesn't. Doing anything useful with it, however, does. Would you consider the engine an optional part of a car? After all, the
radio would still work and you can put things in the glove compartment.

> We just disagree on where to break the packages up.
We disagree on what a dependency is. I say a dependency is something required in order to have any functionality that is not defined as
optional or extra by the author(s). You say it's anything required in order to initialize, even if there is little to no actual
functionality. Perhaps you are fond of hunting down components to make something work, but most people would expect a packaging system to
automatically install whatever is required to make the software they want to use do what it is supposed to. Or perhaps you had a dummy
package in mind that would automatically pull in Tcl/Tk and X and whatever else is required to make tkinter draw things on a screen as a
convenience. Of course, that brings us back to the OP's problem...

Since Linux distros already include whatever third-party software they see fit as part of their base (or have the OS installer install
whatever the user specifies during installation), why not have desktop configurations include tkinter by default when installing?
-- 
CPython 3.3.1 | Windows NT 6.2.9200 / FreeBSD 9.1

[toc] | [prev] | [next] | [standalone]


#44136

Fromrusi <rustompmody@gmail.com>
Date2013-04-22 20:50 -0700
Message-ID<5f014763-5f9d-43be-95c6-20865abbd78b@k6g2000pbq.googlegroups.com>
In reply to#44126
On Apr 23, 5:22 am, Steven D'Aprano <steve
+comp.lang.pyt...@pearwood.info> wrote:
> We're also glossing over what it means to be a dependency. This is not
> obvious, and in fact I would argue that X is NOT a dependency for
> tkinter, even though tkinter will not "work" without it, for some
> definition of work. I can quite happily import tkinter on a remote
> machine over ssh:

Yes the crux of the matter is what it means 'to work' and therefore
'to not work'

Lets say my car is 'not working'
On further investigation its found that the petrol tank is empty.
A case could be made for either case: 'it (the car) working' or 'its
not working'

To the extent that pragmatically 'not working' is attended by a
mechanic, its not in that category
To the extent that (even more pragmatically) I missed an important
appointment, its in that category

Both of which gloss over the fact that after filling the petrol it may
still not work.
So to conclude: "since I could not check,  its vacuously working"
is more problematic than the contrary
"since I could not check, its vacuously not working"

Package systems need to 'federate' so to speak workingness from a
zillion packages to the whole system.
The problem is that workingness is peculiar to each package.
Therefore it seems reasonable to me to ask of a package system that
- it allows a maximum number of different configurations for different
requirements ('without crap')
- it disallows all kinds of misconfigured/non-working systems --
therefore conservative dependencies are good
- the above subject to reasonable best efforts -- so dont cater to
fringe pathological cases (like I want Tkinter but not X)

BTW I suggested earlier that python could have something like KDE (Kde-
full and a smaller Kde-standard).
Just checked that python already has python2.7 and python2.7-minimal
where the description of the latter says: "it can be used in the boot
process for basic tasks"

[toc] | [prev] | [next] | [standalone]


#44152

FromRui Maciel <rui.maciel@gmail.com>
Date2013-04-23 07:57 +0100
Message-ID<kl5b7q$1mq$1@dont-email.me>
In reply to#44126
Steven D'Aprano wrote:

> No, the job of the package system is to manage dependencies. It makes no
> guarantee about whether or not something will "work".

The purpose of establishing dependencies is to guarantee that once a 
software package is installed, all the necessary components needed for it to 
run properly are already present in the system or can be installed 
automatically.

http://en.wikipedia.org/wiki/Dependency_hell


Rui Maciel

[toc] | [prev] | [next] | [standalone]


#44114

FromRui Maciel <rui.maciel@gmail.com>
Date2013-04-22 22:09 +0100
Message-ID<kl48o2$t8m$1@dont-email.me>
In reply to#44040
Steven D'Aprano wrote:

> I think that if you are worrying about the overhead of the tkinter
> bindings for Python, you're guilty of premature optimization.

I'm not worried about that.  No one should be forced to install crap that 
they don't use or will ever need, no matter how great the average HD 
capacity is nowadays.


Rui Maciel

[toc] | [prev] | [next] | [standalone]


#44124

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2013-04-22 23:30 +0000
Message-ID<5175c825$0$29977$c3e8da3$5496439d@news.astraweb.com>
In reply to#44114
On Mon, 22 Apr 2013 22:09:14 +0100, Rui Maciel wrote:

> Steven D'Aprano wrote:
> 
>> I think that if you are worrying about the overhead of the tkinter
>> bindings for Python, you're guilty of premature optimization.
> 
> I'm not worried about that.  No one should be forced to install crap
> that they don't use or will ever need, no matter how great the average
> HD capacity is nowadays.

Nobody forces you to do anything. Python is open source, and the source 
code is freely available. Feel free to hand-optimize your Python 
installation, selecting carefully each and every module, class, and 
function in the standard library so that only the ones you absolutely 
know you will need to use are installed, using your godlike powers of 
precognition to foresee exactly what you need in seventeen months from 
now and what is "crap" that you will never need.

Good luck with that. I look forward to hearing about the results.



-- 
Steven

[toc] | [prev] | [next] | [standalone]


#44148

FromRui Maciel <rui.maciel@gmail.com>
Date2013-04-23 07:44 +0100
Message-ID<kl5afi$v5h$1@dont-email.me>
In reply to#44124
Steven D'Aprano wrote:

> Nobody forces you to do anything. Python is open source, and the source
> code is freely available.

That goes both ways, with the added benefit that python-tkinter is already 
available in distro's official repositories.  If you want to install it, go 
for it.  Nothing stops you.  If you don't then you aren't forced to install 
half the packages in the repository just to have a python interpreter in 
your system.


Rui Maciel

[toc] | [prev] | [next] | [standalone]


#44176

Fromrusi <rustompmody@gmail.com>
Date2013-04-23 05:01 -0700
Message-ID<a9740a06-1147-497a-9287-9cafd355dc35@hc4g2000pbb.googlegroups.com>
In reply to#44148
On Apr 23, 11:44 am, Rui Maciel <rui.mac...@gmail.com> wrote:
> Steven D'Aprano wrote:
> > Nobody forces you to do anything. Python is open source, and the source
> > code is freely available.
>
> That goes both ways, with the added benefit that python-tkinter is already
> available in distro's official repositories.  If you want to install it, go
> for it.  Nothing stops you.  If you don't then you aren't forced to install
> half the packages in the repository just to have a python interpreter in
> your system.
>
> Rui Maciel

Collecting together what are the conflicting principles
---------------------------------------------


1 Fail early Fail fast
2 Good error messages
3 No crap
4 A working system
   that is easily upgradable and keeps working
5 Package system permissive
     allows wide variation of package combinations
6 Package system strict
     Disallows error-prone situations/combinations
7 Easy on learners/noobs

[toc] | [prev] | [next] | [standalone]


#44145

FromBob Martin <bob.martin@excite.com>
Date2013-04-23 07:33 +0100
Message-ID<atmoakFbfrnU1@mid.individual.net>
In reply to#44040
in 695509 20130422 081727 Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote:

>I think that if you are worrying about the overhead of the tkinter
>bindings for Python, you're guilty of premature optimization. The tkinter
>package in Python 3.3 is trivially small, under 2 MB.

"trivially small"?
30 years ago a small mainframe only had 2MB. 

[toc] | [prev] | [next] | [standalone]


#44147

FromChris Angelico <rosuav@gmail.com>
Date2013-04-23 16:41 +1000
Message-ID<mailman.954.1366699299.3114.python-list@python.org>
In reply to#44145
On Tue, Apr 23, 2013 at 3:33 PM, Bob Martin <bob.martin@excite.com> wrote:
> in 695509 20130422 081727 Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote:
>
>>I think that if you are worrying about the overhead of the tkinter
>>bindings for Python, you're guilty of premature optimization. The tkinter
>>package in Python 3.3 is trivially small, under 2 MB.
>
> "trivially small"?
> 30 years ago a small mainframe only had 2MB.

30 years ago, people weren't using Tk. We've moved on beyond worrying
about the odd kilobyte of space. (Also, I think you're talking RAM,
and Steven was talking hard disk. Systems can easily have another SI
unit of disk than memory.)

ChrisA

[toc] | [prev] | [next] | [standalone]


#44151

FromRui Maciel <rui.maciel@gmail.com>
Date2013-04-23 07:48 +0100
Message-ID<kl5amn$v5h$2@dont-email.me>
In reply to#44147
Chris Angelico wrote:

> 30 years ago, people weren't using Tk. 

And after 30 years gone by, some people still don't use Tk, let alone 
Tkinter.  There is absolutely no reason to force them to install that if 
they don't need to.


> We've moved on beyond worrying about the odd kilobyte of space.

That must be reason why you are the only one complaining about that.


Rui Maciel

[toc] | [prev] | [next] | [standalone]


#44162

FromChris Angelico <rosuav@gmail.com>
Date2013-04-23 17:34 +1000
Message-ID<mailman.962.1366702447.3114.python-list@python.org>
In reply to#44151
On Tue, Apr 23, 2013 at 4:48 PM, Rui Maciel <rui.maciel@gmail.com> wrote:
> Chris Angelico wrote:
>
>> 30 years ago, people weren't using Tk.
>
> And after 30 years gone by, some people still don't use Tk, let alone
> Tkinter.  There is absolutely no reason to force them to install that if
> they don't need to.

Agreed; my preference is GTK, when I do GUI work.

>> We've moved on beyond worrying about the odd kilobyte of space.
>
> That must be reason why you are the only one complaining about that.

I'm not.

ChrisA

[toc] | [prev] | [next] | [standalone]


#44050

Fromlcrocker <leedanielcrocker@gmail.com>
Date2013-04-22 04:18 -0700
Message-ID<26d6d300-9f1b-4640-bbc6-d9c653bb6ad4@ph9g2000pbb.googlegroups.com>
In reply to#44039
On Apr 21, 11:36 pm, Rui Maciel <rui.mac...@gmail.com> wrote:
> Steven D'Aprano wrote:
> > It's only easy to install a package on Ubuntu if you know that you have
> > to, and can somehow work out the name of the package.
>
> No one actually has to install tkinter.  That's the whole point of providing
> it as a separate package: only those who want to use it have to install it.
> The rest of us don't.

I'm a programmer, I installed Tkinter, and use it. I'd like to deploy
programs
written with it to others.  **Those** people know nothing about it,
and
**shouldn't have to**. I've given them a program in Python, they have
Python,
but it doesn't run, and doesn't give them a helpful error. They'll
probably
just blame me and move on.  Not every Python user is a programmer.  If
I write
a program in Java, any user with Java installed can run it.  As it
stands,
that's no true for Python.  That's not good PR for the cause.

[toc] | [prev] | [next] | [standalone]


#44052

Fromrusi <rustompmody@gmail.com>
Date2013-04-22 05:08 -0700
Message-ID<8543d75e-c4d6-4683-abbf-c0ad766d6e52@mf10g2000pbb.googlegroups.com>
In reply to#44050
On Apr 22, 4:18 pm, lcrocker <leedanielcroc...@gmail.com> wrote:
> On Apr 21, 11:36 pm, Rui Maciel <rui.mac...@gmail.com> wrote:
>
> > Steven D'Aprano wrote:
> > > It's only easy to install a package on Ubuntu if you know that you have
> > > to, and can somehow work out the name of the package.
>
> > No one actually has to install tkinter.  That's the whole point of providing
> > it as a separate package: only those who want to use it have to install it.
> > The rest of us don't.
>
> I'm a programmer, I installed Tkinter, and use it. I'd like to deploy
> programs
> written with it to others.  **Those** people know nothing about it,
> and
> **shouldn't have to**. I've given them a program in Python, they have
> Python,
> but it doesn't run, and doesn't give them a helpful error. They'll
> probably
> just blame me and move on.  Not every Python user is a programmer.  If
> I write
> a program in Java, any user with Java installed can run it.  As it
> stands,
> that's no true for Python.  That's not good PR for the cause.

On the whole agree -- except for the java part -- maybe you've not
heard of 'jar hell'?
On the whole easy-deployability without losing easy-programmability is
a major research issue.

See this for someone choosing C++ over Lisp
http://comments.gmane.org/gmane.comp.finance.ledger.general/1955

[toc] | [prev] | [next] | [standalone]


#44064

FromChris Angelico <rosuav@gmail.com>
Date2013-04-22 23:07 +1000
Message-ID<mailman.912.1366636513.3114.python-list@python.org>
In reply to#44050
On Mon, Apr 22, 2013 at 9:18 PM, lcrocker <leedanielcrocker@gmail.com> wrote:
> On Apr 21, 11:36 pm, Rui Maciel <rui.mac...@gmail.com> wrote:
>> Steven D'Aprano wrote:
>> > It's only easy to install a package on Ubuntu if you know that you have
>> > to, and can somehow work out the name of the package.
>>
>> No one actually has to install tkinter.  That's the whole point of providing
>> it as a separate package: only those who want to use it have to install it.
>> The rest of us don't.
>
> I'm a programmer, I installed Tkinter, and use it. I'd like to deploy
> programs
> written with it to others.  **Those** people know nothing about it,
> and
> **shouldn't have to**. I've given them a program in Python, they have
> Python,
> but it doesn't run, and doesn't give them a helpful error. They'll
> probably
> just blame me and move on.  Not every Python user is a programmer.  If
> I write
> a program in Java, any user with Java installed can run it.  As it
> stands,
> that's no true for Python.  That's not good PR for the cause.

If you're deploying only to Debian-based Linuxes (such as the Ubuntu
you mentioned originally), then it may be worth distributing your
program as a .deb file and declaring all the appropriate dependencies
(which would then include python3-tk). Alternatively, just put an
"apt-get install python3-tk" into your install script (which is what I
do for internal deployments - if you need package XYZ for program Foo,
inst-foo will install XYZ), or simply tell people they need to install
it. How do you make sure they even have a Python 3.x? Whatever you do
to ensure that, just add python3-tk to it.

ChrisA

[toc] | [prev] | [next] | [standalone]


#44112

FromRui Maciel <rui.maciel@gmail.com>
Date2013-04-22 22:00 +0100
Message-ID<kl487o$qhv$1@dont-email.me>
In reply to#44050
lcrocker wrote:

> I'm a programmer, I installed Tkinter, and use it. I'd like to deploy
> programs written with it to others.  **Those** people know nothing 
> about it, and **shouldn't have to**.

They don't need to.  The only person that needs to know what he is doing is 
you.  You want to distribute a software package?  Package it.  Learn the 
very basics and set python-tkinter as a dependency.

http://wiki.debian.org/Packaging


Rui Maciel

[toc] | [prev] | [next] | [standalone]


#44038

FromRui Maciel <rui.maciel@gmail.com>
Date2013-04-22 07:35 +0100
Message-ID<kl2li0$qnv$1@dont-email.me>
In reply to#43920
lcrocker wrote:

> I understand that for something like a server distribution, but Ubuntu
> is a user-focused desktop distribution. It has a GUI, always. 

Irrelevant.  


> The
> purpose of a distro like that is to give users a good experience. If I
> install Python on Windows, I get to use Python. On Ubuntu, I don't,
> and I think that will confuse some users. 

Nonsense.  No one is keeping anyone off tkinter.  If you want it, install 
it.  There are official packages in the repositories such as python-tk and 
python3-tk.  If someone else doesn't want them then they aren't forced to 
pack their Ubuntu systems with more cruft.  There's nothing worse than being 
forced to install piles of irrelevant and useless stuff as a dependency to a 
fundamental package.


> I recently recommended
> Python to a friend who wants to start learning programming. Hurdles
> like this don't help someone like him.

If your friend believes that having to do an extra pair of clicks or typing 
sudo apt-get install python-tk is an unbeatable hurdle then your friend's 
computer skills are awfully lacking and he won't have much success learning 
how to write programs.


Rui Maciel

[toc] | [prev] | [next] | [standalone]


Page 2 of 3 — ← Prev page 1 [2] 3  Next page →

Back to top | Article view | comp.lang.python


csiph-web