<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX Processorsのトピックimport tkinter fails in IMX8</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/import-tkinter-fails-in-IMX8/m-p/1163784#M163023</link>
    <description>&lt;P&gt;Hi I am working on IMX8mq evaluation kit. The tkinter module import fails in imx&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;&amp;gt; import tkinter&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt;File "/usr/lib/python3.7/tkinter/__init__.py", line 36, in &amp;lt;module&amp;gt;&lt;BR /&gt;import _tkinter # If this fails your Python may not be configured for Tk&lt;BR /&gt;ModuleNotFoundError: No module named '_tkinter'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;The yocto project version is 3.0 zeus.&amp;nbsp;&lt;/P&gt;&lt;P&gt;distro =&amp;nbsp; fsl-imx-xwayland&lt;/P&gt;&lt;P&gt;python3-tkinter is already in the image.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I resolve this ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Oct 2020 08:23:46 GMT</pubDate>
    <dc:creator>nishitha_a</dc:creator>
    <dc:date>2020-10-07T08:23:46Z</dc:date>
    <item>
      <title>import tkinter fails in IMX8</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/import-tkinter-fails-in-IMX8/m-p/1163784#M163023</link>
      <description>&lt;P&gt;Hi I am working on IMX8mq evaluation kit. The tkinter module import fails in imx&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;&amp;gt; import tkinter&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt;File "/usr/lib/python3.7/tkinter/__init__.py", line 36, in &amp;lt;module&amp;gt;&lt;BR /&gt;import _tkinter # If this fails your Python may not be configured for Tk&lt;BR /&gt;ModuleNotFoundError: No module named '_tkinter'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;The yocto project version is 3.0 zeus.&amp;nbsp;&lt;/P&gt;&lt;P&gt;distro =&amp;nbsp; fsl-imx-xwayland&lt;/P&gt;&lt;P&gt;python3-tkinter is already in the image.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I resolve this ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 08:23:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/import-tkinter-fails-in-IMX8/m-p/1163784#M163023</guid>
      <dc:creator>nishitha_a</dc:creator>
      <dc:date>2020-10-07T08:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: import tkinter fails in IMX8</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/import-tkinter-fails-in-IMX8/m-p/1163931#M163048</link>
      <description>&lt;P&gt;Hello nishita_a,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;The reason is that tk is not in oe-core (even though tcl is), so the
_tkinter python extension (compiled c code) is disabled.[1]
&lt;BR /&gt;&lt;A href="http://layers.openembedded.org/layerindex/branch/master/recipes/?q=tkinter" target="_blank"&gt;http://layers.openembedded.org/layerindex/branch/master/recipes/?q=tkinter&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 13:11:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/import-tkinter-fails-in-IMX8/m-p/1163931#M163048</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2020-10-07T13:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: import tkinter fails in IMX8</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/import-tkinter-fails-in-IMX8/m-p/1163948#M163050</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the quick reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So is there any way to enable _tkinter extension?&lt;/P&gt;&lt;P&gt;The link provides directs to blank page in openembedded site.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 13:35:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/import-tkinter-fails-in-IMX8/m-p/1163948#M163050</guid>
      <dc:creator>nishitha_a</dc:creator>
      <dc:date>2020-10-07T13:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: import tkinter fails in IMX8</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/import-tkinter-fails-in-IMX8/m-p/1164430#M163109</link>
      <description>&lt;P&gt;The Tkinter library is built-in with every Python installation.&lt;/P&gt;&lt;P&gt;The most probably you are typing the command wrong. It should be:&lt;/P&gt;&lt;PRE&gt;import Tkinter as tk&lt;/PRE&gt;&lt;P&gt;Note the capital T at the beginning of Tkinter.&lt;/P&gt;&lt;P&gt;For Python 3,&lt;/P&gt;&lt;PRE&gt;import tkinter as tk&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Oct 2020 09:52:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/import-tkinter-fails-in-IMX8/m-p/1164430#M163109</guid>
      <dc:creator>toanjunifer</dc:creator>
      <dc:date>2020-10-08T09:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: import tkinter fails in IMX8</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/import-tkinter-fails-in-IMX8/m-p/1234374#M169820</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have the same problem.&lt;/P&gt;&lt;P&gt;Has someone a solution?&lt;/P&gt;&lt;P&gt;How can I fix this problem.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 13:07:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/import-tkinter-fails-in-IMX8/m-p/1234374#M169820</guid>
      <dc:creator>sebastiansuesen</dc:creator>
      <dc:date>2021-02-22T13:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: import tkinter fails in IMX8</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/import-tkinter-fails-in-IMX8/m-p/1465271#M190890</link>
      <description>&lt;P&gt;I had the same problem,and finally I&amp;nbsp;solved it.&lt;BR /&gt;&lt;BR /&gt;I referred to the following,&lt;BR /&gt;&amp;lt;&lt;A href="https://www.mail-archive.com/yocto@lists.yoctoproject.org/msg07081.html" target="_blank"&gt;Re: [yocto] Enabling tk for Python tkinter module (mail-archive.com)&lt;/A&gt;&amp;gt;&lt;BR /&gt;And I added&lt;/P&gt;&lt;PRE&gt;PACKAGECONFIG:append:pn-python3 = “ tk”&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;to my local.conf file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After that,I had the error,&lt;BR /&gt;[_&lt;SPAN&gt;tkinter.TclError: no display name and no $DISPLAY environment variable&lt;/SPAN&gt;]&lt;BR /&gt;so I add following, to my python script,and I can display my GUI.&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;if os.environ.get('DISPLAY','') == '':&lt;BR /&gt;&amp;nbsp; &amp;nbsp;print('no display found. Using :0.0')&lt;BR /&gt;&amp;nbsp; &amp;nbsp;os.environ.__setitem__('DISPLAY', ':0.0')&lt;BR /&gt;---&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2022 04:30:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/import-tkinter-fails-in-IMX8/m-p/1465271#M190890</guid>
      <dc:creator>may_snow</dc:creator>
      <dc:date>2022-05-27T04:30:56Z</dc:date>
    </item>
  </channel>
</rss>

