Skip to contentSkip to conversation

how to add tkinter in Yocto?

DISCUSSION [email protected] 2 participants 4 messages Nov 4, 2023 – Nov 5, 2023 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello all,

I want to add " *Tkinter"* in my Linux image and for this, i have added these two line in my local.conf file. * (1)" IMAGE_INSTALL:append = " python3-tkinter"
(2)PACKAGECONFIG:append:pn-python3 = " tk"

* When I compile i get the following errors: *

shri@Shri:~/Yocto_Rasp/poky$ bitbake core-image-sato
Loading cache: 100% |#################################################################| Time: 0:00:00
Loaded 1838 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES 'tk' (but /home/shri/Yocto_Rasp/poky/meta/recipes-devtools/python/python3_3.11.2.bb DEPENDS on or otherwise requires it). Close matches:
atk
NOTE: Runtime target 'python3-tkinter' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['python3-tkinter', 'tk']
ERROR: Required build target 'core-image-sato' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-sato', 'python3-tkinter', 'tk']

* What am I doing wrong? *

*
Please help after this I also want to add *" ttkbootstrap/custom-tkinter "* for a modern UI look and feel. *

Thanks and Regards
Shrikant Vaishnav
*

#1 lore raw
Quoted 4 lines · On 11/4/23 16:55, [email protected] wrote:

/ERROR: Nothing PROVIDES 'tk' (but /home/shri/Yocto_Rasp/poky/meta/recipes-devtools/python/python3_3.11.2.bb DEPENDS on or otherwise requires it). Close matches:/ /  atk/
/NOTE: Runtime target 'python3-tkinter' is unbuildable, removing.../
/Missing or unbuildable dependency chain was: ['python3-tkinter', 'tk']/

tk is part of meta-oe - have you added its folder to BBLAYERS in bblayers.conf?

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Re: Private: Re: [yocto] how to add tkinter in Yocto?

Please make sure to send your response to the list, so the most people can help you (and others having the same issue can find this info also).

Quoted 11 lines · On 11/5/23 10:29, [email protected] wrote:

Sir,

After adding *"meta-oe" *inside *"bblayers.conf"* image compilation is successful now. But when I try to test for tkinter using the command: *"python3 -m tkinter"*
 I get following error:

/*_tkinter.TclError: Can't find a usable init.tcl in the following directories: */ /*/usr/lib/tcl8.6 /usr/lib/tcl8.6 /lib/tcl8.6 /usr/library /library /tcl8.6.13/library /tcl8.6.13/library */ /*This probably means that Tcl wasn't installed properly.

*what am I doing wrong?*

Do you have tcl installed in your image? Add "tcl" either to the RDEPENDS:${PN} variable of tk in a .bbappend file, or add the same to the IMAGE_INSTALL variable in your image recipe - both ways supposed to help installing the missing file.

Quoted 6 lines

*please help.

Regards
Shrikant Vaishnav/

#4 lore raw

Re: Private: Re: [yocto] how to add tkinter in Yocto?

Will do, thanks!

Thanks & Regards

Shrikant Vaishnav

________________________________
From: Gyorgy Sarvari <[email protected]>
Sent: Sunday, November 5, 2023 4:58 PM
To: [email protected] <[email protected]>; [email protected] <[email protected]>
Subject: Re: Private: Re: [yocto] how to add tkinter in Yocto?

Please make sure to send your response to the list, so the most people can help you (and others having the same issue can find this info also).

Quoted 7 lines · On 11/5/23 10:29, [email protected] wrote:

Sir,

After adding *"meta-oe" *inside *"bblayers.conf"* image compilation is successful now.
But when I try to test for tkinter using the command: *"python3 -m tkinter"*
I get following error:

Quoted 7 lines

/*_tkinter.TclError: Can't find a usable init.tcl in the following
directories: */
/*/usr/lib/tcl8.6 /usr/lib/tcl8.6 /lib/tcl8.6 /usr/library /library /tcl8.6.13/library /tcl8.6.13/library */
/*This probably means that Tcl wasn't installed properly.

*what am I doing wrong?*

Do you have tcl installed in your image? Add "tcl" either to the RDEPENDS:${PN} variable of tk in a .bbappend file, or add the same to the IMAGE_INSTALL variable in your image recipe - both ways supposed to help installing the missing file.

Quoted 6 lines

*please help.

Regards
Shrikant Vaishnav/