From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FFDBC433EF for ; Wed, 29 Sep 2021 01:21:58 +0000 (UTC) Received: from mail-il1-f179.google.com (mail-il1-f179.google.com [209.85.166.179]) by mx.groups.io with SMTP id smtpd.web08.3083.1632878517245746313 for ; Tue, 28 Sep 2021 18:21:57 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=E/9dBTc6; spf=pass (domain: gmail.com, ip: 209.85.166.179, mailfrom: ticotimo@gmail.com) Received: by mail-il1-f179.google.com with SMTP id i13so1056867ilm.4 for ; Tue, 28 Sep 2021 18:21:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EYlzof8iyCNdtoQt1AkJCWFUEfJcv6I2qEVglGhlTHc=; b=E/9dBTc6odH7CYIZe01lljS9M4YtSvA+Ir5BnKY07VH+f8UQ4/LKBubCdDJDDgNlYI a5daSbEfU/9qhi9odGT+cB6zwb8nfSE2i2jcOlRyDbNdkBQSlXOCm3tkG9tNgp5PrGF9 zmNTY5gOmMMBa1RAbFlUYKvQymzAqqofdfmzCz4y7gAreJmBssU97GYqBL9f6fgRqTf7 N/iAo5udGANGPRl+WAknZCmnWM6bydiNno1qrQGHoBkT46FcUgcvqjzTktM2SCqTa2EN CWDRA+PWbOjEyMi+urkAC+RXNY/XEZ/P7JtWz1YzGnewSHrwB+ANZKaYyPXZt6x+pbc6 oa4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EYlzof8iyCNdtoQt1AkJCWFUEfJcv6I2qEVglGhlTHc=; b=KJ3JY/yDuxT9DjGScKWURTrrc5dIzy7p1lpONyIA9Yf+fMqoKMFF99+A/Lu6C+k4Nd uS1kArXU5txx1gORfQ/jstjqP0YcDzO1kRpP9fviHwXTrwwXGwL37Yrb2XvlIKZ7CCQ7 HS8Mwo5qh/8rW2YA+ORzLszz55gIASlhv+k5FgjCQZhRppqUnJxLLFpTcEpqVrhihKNr pqzz0Dn3VZzNkA6BvEG1KHJ/fY26PTTAcw+KCDSYju/3TMlWYoTbEAYEUuvWCestgN/O ykcr2ff4BJ6PHbAeC7C9QClvZw9d5A7NmLpUBkkFz9SnvbCCz/Ox4F9NrMY+Lfr+y3j4 ETqA== X-Gm-Message-State: AOAM532eYuIPPOGbKgPTp2jBUcF7DIepOXJvmcfk617NyaKgLvEdS0ML Eyfej35e/Sbmu6PKuVzsSRNm5RJnTvKI5MKUcp39456tz1w= X-Google-Smtp-Source: ABdhPJy89dvvn3Mor3i+q70kllcHHs08LNk9i0tp3u4MMMwHyq/gmxKoUQmJSr/XIjJIzYzeCKkd7GOmDe87kdPYJ04= X-Received: by 2002:a05:6e02:20c7:: with SMTP id 7mr6700879ilq.118.1632878516405; Tue, 28 Sep 2021 18:21:56 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Tim Orling Date: Tue, 28 Sep 2021 18:21:45 -0700 Message-ID: Subject: Re: [yocto] Enabling tk for Python tkinter module To: Chris Tapp Cc: yocto@lists.yoctoproject.org Content-Type: multipart/alternative; boundary="000000000000ee8db705cd182778" List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 29 Sep 2021 01:21:58 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/54900 --000000000000ee8db705cd182778 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Sep 28, 2021 at 2:58 PM Chris Tapp wrote: > I am trying to get PySimpleGUI running on an RPi4 using meta-raspberrypi > with hardknott. > > I have created a recipe for PySimpleGUI and added the following to my > local.conf: > > PACKAGECONFIG_pn-python3 =3D =E2=80=9Ctk=E2=80=9D > IMAGE_INSTALL_append =3D " python3 python3-modules python3-pysimplegui tk= " > > However, the tkinter module fails to load, reporting =E2=80=9CNo module n= amed > _tkinter=E2=80=9D, with a note above saying that Python may not be config= ured for > Tk. > > Looking on the target, /usr/lib/libtk.8.so is present. > > It looks as if there is something else I need to do to get Python to buil= d > correctly, but I=E2=80=99m out of ideas ;-) > You need to add =E2=80=9Ctk=E2=80=9D to the package config for python3 http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/p= ython/python3_3.9.6.bb#n110 Add the following to your distro|site|local.conf (or a python3_%.bbappend) PACKAGECONFIG:append:pn-python3 =3D =E2=80=9C tk=E2=80=9D ( replace : with _ if you are on old release that doesn=E2=80=99t support t= he new override syntax) (This assumes you have meta-oe in your bblayers.conf so you can build tk, which it sounds like you do) This is because the _tkinter .so built by python3 is dynamically loaded only if present http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/p= ython/python3/python3-manifest.json#n1161 =E2=80=94Tim =E2=80=9Cmoto-timo=E2=80=9D Orling > I=E2=80=99ve found a few bits on the internet that seem related, but they= haven=E2=80=99t > helped me get things going: > https://www.mail-archive.com/yocto@yoctoproject.org/msg18232.html > https://www.yoctoproject.org/pipermail/yocto/2014-July/020547.html > > Any pointers on where to look would be appreciated. > > -- > > Chris Tapp > opensource@keylevel.com > www.keylevel.com > > > -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- > Links: You receive all messages sent to this group. > View/Reply Online (#54893): > https://lists.yoctoproject.org/g/yocto/message/54893 > Mute This Topic: https://lists.yoctoproject.org/mt/85935979/924729 > Group Owner: yocto+owner@lists.yoctoproject.org > Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ > ticotimo@gmail.com] > -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- > > --000000000000ee8db705cd182778 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Sep 28, 2021 at 2:58 PM Chris Tapp <opensource@keylevel.com> wrote:
I am trying to get PySimpleGUI running on an RPi4 usin= g meta-raspberrypi with hardknott.

I have created a recipe for PySimpleGUI and added the following to my local= .conf:

PACKAGECONFIG_pn-python3 =3D =E2=80=9Ctk=E2=80=9D
IMAGE_INSTALL_append =3D " python3 python3-modules python3-pysimplegui= tk"

However, the tkinter module fails to load, reporting =E2=80=9CNo module nam= ed _tkinter=E2=80=9D, with a note above saying that Python may not be confi= gured for Tk.

Looking on the target, /usr/lib/libtk.8.so is present.

It looks as if there is something else I need to do to get Python to build = correctly, but I=E2=80=99m out of ideas ;-)

You need to add = =E2=80=9Ctk=E2=80=9D to the package config for python3

Add the following t= o your distro|site|local.conf (or a python3_%.bbappend)

PACKAGECONFIG:append:pn-python3 =3D =E2=80= =9C tk=E2=80=9D

( replac= e : with _ if you are on old release that doesn=E2=80=99t support the new o= verride syntax)

(This assumes you have met= a-oe in your bblayers.conf so you can build tk, which it sounds like you do= )

This is because the _t= kinter .so built by python3 is dynamically loaded only if present=C2=A0
=E2=80=94Tim =E2=80=9Cmoto-timo=E2=80=9D Orling


I=E2=80=99ve found a few bits on the internet that seem related, but they h= aven=E2=80=99t helped me get things going:
=C2=A0https://www.mail-archive.com/= yocto@yoctoproject.org/msg18232.html
=C2=A0https://www.yoctoproject.org= /pipermail/yocto/2014-July/020547.html

Any pointers on where to look would be appreciated.

--

Chris Tapp
opensource@key= level.com
ww= w.keylevel.com


-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
Links: You receive all messages sent to this group.
View/Reply Online (#54893): https://lists.yoctop= roject.org/g/yocto/message/54893
Mute This Topic: https://lists.yoctoproject.org/mt/= 85935979/924729
Group Owner: yocto+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/un= sub [ticotimo@g= mail.com]
-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-

--000000000000ee8db705cd182778--