Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Ninety percent of baseball is half mental." -- Yogi Berra


devel / comp.lang.tcl / Re: Is Tcl/Tk supported on Ubuntu Desktop Linux?

SubjectAuthor
* Is Tcl/Tk supported on Ubuntu Desktop Linux?lew-e jones-ayres
`- Is Tcl/Tk supported on Ubuntu Desktop Linux?Christian Gollwitzer

1
Re: Is Tcl/Tk supported on Ubuntu Desktop Linux?

<496ac322-b408-411c-a5fd-96755d3e946bn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10790&group=comp.lang.tcl#10790

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:ac8:11a:0:b0:3b8:6b32:fc1c with SMTP id e26-20020ac8011a000000b003b86b32fc1cmr1409349qtg.4.1677109695727;
Wed, 22 Feb 2023 15:48:15 -0800 (PST)
X-Received: by 2002:a81:4507:0:b0:533:9b00:dd0b with SMTP id
s7-20020a814507000000b005339b00dd0bmr1362533ywa.2.1677109695414; Wed, 22 Feb
2023 15:48:15 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Wed, 22 Feb 2023 15:48:15 -0800 (PST)
In-Reply-To: <QKmdnZaDJuolQXP8nZ2dnUU7-IXNnZ2d@giganews.com>
Injection-Info: google-groups.googlegroups.com; posting-host=82.45.37.88; posting-account=SP6WGwoAAABKmy5mMjja0X586R1eJlvv
NNTP-Posting-Host: 82.45.37.88
References: <cd13fe5e-5864-48b5-8b07-8c2a6c3513fen@googlegroups.com>
<61ed3e26$0$1349$426a74cc@news.free.fr> <1c5cb049-43e6-4e8f-a8eb-c69959a024dcn@googlegroups.com>
<QKmdnZaDJuolQXP8nZ2dnUU7-IXNnZ2d@giganews.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <496ac322-b408-411c-a5fd-96755d3e946bn@googlegroups.com>
Subject: Re: Is Tcl/Tk supported on Ubuntu Desktop Linux?
From: lewieame...@gmail.com (lew-e jones-ayres)
Injection-Date: Wed, 22 Feb 2023 23:48:15 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4840
 by: lew-e jones-ayres - Wed, 22 Feb 2023 23:48 UTC

On Monday, 24 January 2022 at 17:07:12 UTC, Robert Heller wrote:
> At Mon, 24 Jan 2022 08:43:18 -0800 (PST) gsal <salg...@gmail.com> wrote:
>
> >
> > On Sunday, January 23, 2022 at 6:38:24 AM UTC-5, Francois Vogel wrote:
> > > Le 22/01/2022 à 23:37, Alwyn Teh a écrit :
> > > > I just installed the latest Ubuntu Desktop 21.10 and built Tcl.
> > > >
> > > > But Tk is not building on Ubuntu from the unix directory.
> > > >
> > > > /home/alteh/dev/Tcl-Tk/tk8.6.12/unix/../generic/tk.h:99:13: fatal error: X11/Xlib.h: No such file or directory
> > > > 99 | # include <X11/Xlib.h>
> > > > | ^~~~~~~~~~~~
> > > > compilation terminated.
> > > You probably need to install the libx11-dev package.
> > >
> > > Regards,
> > > Francois
> >
> >
> > Don't the tk sources come with their own ./xlib/X11/Xlib.h ?
> > Maybe it is a matter of making sure that directory is in one of those "-I" (<--uppercase i) include paths?
> That is a "fake" xlib/X11/Xlib.h for MS-Windows and MacOSX. Tk is written in
> terms of XLib and under MS-Windows and MacOSX some of the XLib-isms are
> "faked" in terms of MS-Windows or MacOSX GUI features. Under actual UNIX or
> Linux, Tk uses the Xlib.h provided by X11. A typical Linux distro separates
> the X11 runtime (shared) libraries from the X11 development stuff (header
> file, link libraries, etc.). Commonly a normal Linux Desktop install just
> installs the runtime. It is necessary to install the -dev (-devel under
> RedHat-ish distros) packages if one plans on building tcl/tk from sources..
>
> The OP *could* have just installed tcl and tk from the distro:
>
> sudo apt install tcl tk
>
> But I guess he wanted to build from source...
>
> >
> >
> >
>
> --
> Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
> Deepwoods Software -- Custom Software Services
> http://www.deepsoft.com/ -- Linux Administration Services
> hel...@deepsoft.com -- Webhosting Services

Hi I know this is an old post but I've been through every forum trying to fix this issue. I need tkinter for my ubuntu virtual machine, I've checked im in the correct python, installed all the packages including the one Robert suggested (though installing from distro so I shouldn't have to). Nothing.. I even tried manually copying the tk8.6 directory into lib and tcl8.6, no effect.
Just:

lewie@lewie-virtual-machine:~/Downloads$ python3

Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
>>> tkinter._test()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.10/tkinter/__init__.py", line 4586, in _test
root = Tk()
File "/usr/lib/python3.10/tkinter/__init__.py", line 2299, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable tk.tcl in the following directories:
/usr/local/lib/tcl8.6/tk8.6 /usr/local/lib/tk8.6 /usr/lib/tk8.6 /usr/lib/tk8.6 /lib/tk8.6 /usr/library

This probably means that tk wasn't installed properly.

>>>

incidentally the /tk8.6/ dir only contains "pkgIndex.tcl"
in case that's what's wrong.

Any help would be great

Lewie

Re: Is Tcl/Tk supported on Ubuntu Desktop Linux?

<tt73k7$1qaik$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10791&group=comp.lang.tcl#10791

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: aurio...@gmx.de (Christian Gollwitzer)
Newsgroups: comp.lang.tcl
Subject: Re: Is Tcl/Tk supported on Ubuntu Desktop Linux?
Date: Thu, 23 Feb 2023 08:12:07 +0100
Organization: A noiseless patient Spider
Lines: 112
Message-ID: <tt73k7$1qaik$1@dont-email.me>
References: <cd13fe5e-5864-48b5-8b07-8c2a6c3513fen@googlegroups.com>
<61ed3e26$0$1349$426a74cc@news.free.fr>
<1c5cb049-43e6-4e8f-a8eb-c69959a024dcn@googlegroups.com>
<QKmdnZaDJuolQXP8nZ2dnUU7-IXNnZ2d@giganews.com>
<496ac322-b408-411c-a5fd-96755d3e946bn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 23 Feb 2023 07:12:07 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="3ab4ad54dfa9e8f985f1352d7dc363cb";
logging-data="1911380"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19CUKkduEwCrXQuF3Rrlcaly/p2nAgWvws="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.8.0
Cancel-Lock: sha1:7vj7JrvR7Mm5ze9tPP1ShTcvN2I=
In-Reply-To: <496ac322-b408-411c-a5fd-96755d3e946bn@googlegroups.com>
 by: Christian Gollwitzer - Thu, 23 Feb 2023 07:12 UTC

Am 23.02.23 um 00:48 schrieb lew-e jones-ayres:
> On Monday, 24 January 2022 at 17:07:12 UTC, Robert Heller wrote:
>> At Mon, 24 Jan 2022 08:43:18 -0800 (PST) gsal <salg...@gmail.com> wrote:
>>
>>>
>>> On Sunday, January 23, 2022 at 6:38:24 AM UTC-5, Francois Vogel wrote:
>>>> Le 22/01/2022 à 23:37, Alwyn Teh a écrit :
>>>>> I just installed the latest Ubuntu Desktop 21.10 and built Tcl.
>>>>>
>>>>> But Tk is not building on Ubuntu from the unix directory.
>>>>>
>>>>> /home/alteh/dev/Tcl-Tk/tk8.6.12/unix/../generic/tk.h:99:13: fatal error: X11/Xlib.h: No such file or directory
>>>>> 99 | # include <X11/Xlib.h>
>>>>> | ^~~~~~~~~~~~
>>>>> compilation terminated.
>>>> You probably need to install the libx11-dev package.
>>>>
>>>> Regards,
>>>> Francois
>>>
>>>
>>> Don't the tk sources come with their own ./xlib/X11/Xlib.h ?
>>> Maybe it is a matter of making sure that directory is in one of those "-I" (<--uppercase i) include paths?
>> That is a "fake" xlib/X11/Xlib.h for MS-Windows and MacOSX. Tk is written in
>> terms of XLib and under MS-Windows and MacOSX some of the XLib-isms are
>> "faked" in terms of MS-Windows or MacOSX GUI features. Under actual UNIX or
>> Linux, Tk uses the Xlib.h provided by X11. A typical Linux distro separates
>> the X11 runtime (shared) libraries from the X11 development stuff (header
>> file, link libraries, etc.). Commonly a normal Linux Desktop install just
>> installs the runtime. It is necessary to install the -dev (-devel under
>> RedHat-ish distros) packages if one plans on building tcl/tk from sources.
>>
>> The OP *could* have just installed tcl and tk from the distro:
>>
>> sudo apt install tcl tk
>>
>> But I guess he wanted to build from source...
>>
>>>
>>>
>>>
>>
>> --
>> Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
>> Deepwoods Software -- Custom Software Services
>> http://www.deepsoft.com/ -- Linux Administration Services
>> hel...@deepsoft.com -- Webhosting Services
>
> Hi I know this is an old post but I've been through every forum trying to fix this issue. I need tkinter for my ubuntu virtual machine, I've checked im in the correct python, installed all the packages including the one Robert suggested (though installing from distro so I shouldn't have to). Nothing. I even tried manually copying the tk8.6 directory into lib and tcl8.6, no effect.
> Just:
>
> lewie@lewie-virtual-machine:~/Downloads$ python3
>
> Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import tkinter
>>>> tkinter._test()
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/lib/python3.10/tkinter/__init__.py", line 4586, in _test
> root = Tk()
> File "/usr/lib/python3.10/tkinter/__init__.py", line 2299, in __init__
> self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
> _tkinter.TclError: Can't find a usable tk.tcl in the following directories:
> /usr/local/lib/tcl8.6/tk8.6 /usr/local/lib/tk8.6 /usr/lib/tk8.6 /usr/lib/tk8.6 /lib/tk8.6 /usr/library
>
> This probably means that tk wasn't installed properly.
>
>>>>
>
> incidentally the /tk8.6/ dir only contains "pkgIndex.tcl"
> in case that's what's wrong.
>

This is strange at the very least. Besides pkgIndex.tcl, there should be
a folder with a lot of support files (scripts, icons, demos,...). It is
basically this stuff:

https://github.com/tcltk/tk/tree/main/library

So maybe the package from your distro is simply broken? Or, the package
from the distro is installed somewhere else, and Tcl picks up a broken
version first and can't find the right version. You can check the path
where Tcl looks for packages like this:

(base) Apfelkiste:~ chris$ python3
Python 3.8.8 (default, Apr 13 2021, 12:59:45)
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
>>> interp=tkinter.Tcl()
>>> interp.eval("set auto_path")
'/Users/chris/bin/anaconda3/lib/tcl8.6 /Users/chris/bin/anaconda3/lib'
>>>

and afterwards try to load Tk manually:

>>> interp.eval("package require Tk")
'8.6.10'

then this should tell you, which version was loaded:

>>> interp.eval("package ifneeded Tk 8.6.10")
'load /Users/chris/bin/anaconda3/lib/libtk8.6.dylib Tk'
>>>

Christian


devel / comp.lang.tcl / Re: Is Tcl/Tk supported on Ubuntu Desktop Linux?

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor