{"id":416,"date":"2020-11-18T20:25:46","date_gmt":"2020-11-18T11:25:46","guid":{"rendered":"https:\/\/www.sea2800.com\/?p=416"},"modified":"2021-08-30T11:15:49","modified_gmt":"2021-08-30T02:15:49","slug":"modulenotfounderror-no-module-named-tkinter%e3%81%ab%e3%81%aa%e3%81%a3%e3%81%9f%e6%99%82%e3%81%ae%e5%af%be%e5%87%a6","status":"publish","type":"post","link":"https:\/\/www.sea2800.com\/?p=416","title":{"rendered":"ModuleNotFoundError: No module named &#8216;_tkinter&#8217;\u306b\u306a\u3063\u305f\u6642\u306e\u5bfe\u51e6"},"content":{"rendered":"\n<script async=\"\" src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<!-- test -->\n<ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-7910153846163820\" data-ad-slot=\"9115942114\" data-ad-format=\"auto\" data-full-width-responsive=\"true\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<p>django\u3067\u30c6\u30b9\u30c8\u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u3092\u958b\u767a\u304c\u7d42\u308f\u3063\u3066\u3059\u3050\u306bGUI\u30a2\u30d7\u30ea\u3092\u4f5c\u6210\u3057\u3088\u3046\u3068\u3001pyenv(python 3.7.3)\u4e0a\u3067tkinter\u3067\u65e9\u901f\u4f5c\u308d\u3046\u3068\u3057\u305f\u3089<\/p>\n\n\n\n<p>ModuleNotFoundError: No module named &#8216;Tkinter&#8217;<\/p>\n\n\n\n<p>\u3068\u3044\u3046\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u3057\u307e\u3044\u51fa\u9f3b\u3092\u632b\u304b\u308c\u3066\u3057\u307e\u3044\u3001\u89e3\u6c7a\u306b\u3082\u82e6\u6226\u3057\u305f\u306e\u3067\u8a18\u9332\u3068\u3057\u3066\u89e3\u6c7a\u65b9\u6cd5\u3092\u6b8b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69fb3db89a246\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69fb3db89a246\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.sea2800.com\/?p=416\/#%E5%8E%9F%E5%9B%A0%E3%80%80\" >\u539f\u56e0\u3000<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.sea2800.com\/?p=416\/#%E8%A7%A3%E6%B1%BA%E3%81%97%E3%81%9F%E6%96%B9%E6%B3%95\" >\u89e3\u6c7a\u3057\u305f\u65b9\u6cd5<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.sea2800.com\/?p=416\/#%E8%A9%A6%E3%81%97%E3%81%9F%E8%A7%A3%E6%B1%BA%E6%96%B9%E6%B3%95\" >\u8a66\u3057\u305f\u89e3\u6c7a\u65b9\u6cd5<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.sea2800.com\/?p=416\/#%E3%83%80%E3%83%A1%E3%82%82%E3%81%A8%E3%81%A7%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%97%E3%81%A6%E3%81%BF%E3%82%8B\" >\u30c0\u30e1\u3082\u3068\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u308b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.sea2800.com\/?p=416\/#pyenv%E3%82%92%E5%86%8D%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%97%E3%81%A6%E3%81%BF%E3%82%8B\" >pyenv\u3092\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u308b<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%8E%9F%E5%9B%A0%E3%80%80\"><\/span> \u539f\u56e0\u3000<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>pyenv\u3092\u4f7f\u3063\u305f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305fpython\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3068\u767a\u751f\u3059\u308b\u30a8\u30e9\u30fc\u306e\u3088\u3046\u3067\u3001pyenv\u306epython\u306ftkinter\u7528\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E8%A7%A3%E6%B1%BA%E3%81%97%E3%81%9F%E6%96%B9%E6%B3%95\"><\/span>\u89e3\u6c7a\u3057\u305f\u65b9\u6cd5<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u5927\u4f53\u306f\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308c\u3070\u89e3\u6c7a\u3059\u308b\u307f\u305f\u3044\u3067\u3059\u304c\u3001\u81ea\u5206\u306f\u305d\u3046\u306f\u884c\u304b\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u3044\u308d\u3044\u308d\u8abf\u3079\u3066\u3082\u82f1\u8a9e\u3067\u691c\u7d22\u3092\u304b\u3051\u3066\u3082\u89e3\u6c7a\u3067\u304d\u305a\u306b\u30cd\u30c3\u30c8\u306e\u6d77\u3092\u5f77\u5fa8\u3063\u3066\u3044\u305f\u3089\u4ee5\u4e0b\u306e\u65b9\u6cd5\u304c\u3042\u308a\u8a66\u3057\u3066\u307f\u305f\u3089\u306e\u3046\u307e\u304f\u884c\u3063\u305f\u3002<\/p>\n\n\n\n<p>\u53c2\u8003\u306b\u3057\u305f\u30b5\u30a4\u30c8<\/p>\n\n\n\n<p>https:\/\/github.com\/pyenv\/pyenv\/issues\/1375<\/p>\n\n\n\n<p>\/usr\/local\/Cellar\/pyenv\/1.2.13\/plugins\/python-build\/bin\/python-build\u3092\u958b\u304d\u5927\u4f53\uff17\uff17\uff15\u884c\u76ee\u3042\u305f\u308a\u306b<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><code>$CONFIGURE_OPTS ${!PACKAGE_CONFIGURE_OPTS} \"${!PACKAGE_CONFIGURE_OPTS_ARRAY}\" || return 1<\/code><\/p><\/blockquote>\n\n\n\n<p>\u304c\u3042\u308b\u306e\u3067\u305d\u308c\u3092<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>$CONFIGURE_OPTS &#8211;with-tcltk-includes=&#8217;-I\/usr\/local\/opt\/tcl-tk\/include&#8217; &#8211;with-tcltk-libs=&#8217;-L\/usr\/local\/opt\/tcl-tk\/lib -ltcl8.6 -ltk8.6&#8242; ${!PACKAGE_CONFIGURE_OPTS} &#8220;${!PACKAGE_CONFIGURE_OPTS_ARRAY}&#8221; || return 1<\/p><\/blockquote>\n\n\n\n<p>\u306b\u66f8\u304d\u63db\u3048\u308b<\/p>\n\n\n\n<p>\u30bf\u30fc\u30df\u30ca\u30eb\u3067python\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u8d77\u52d5\u3057\u305f\u3089<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>import tkinter as tk<br>root = tk.Tk()<\/p><\/blockquote>\n\n\n\n<p>\u3092\u5165\u529b\u3057\u305f\u3089\u753b\u9762\u304c\u51fa\u3066\u304d\u305f\u3089\u6210\u529f\u3067\u3059<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E8%A9%A6%E3%81%97%E3%81%9F%E8%A7%A3%E6%B1%BA%E6%96%B9%E6%B3%95\"><\/span>\u8a66\u3057\u305f\u89e3\u6c7a\u65b9\u6cd5<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E3%83%80%E3%83%A1%E3%82%82%E3%81%A8%E3%81%A7%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%97%E3%81%A6%E3%81%BF%E3%82%8B\"><\/span>\u30c0\u30e1\u3082\u3068\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u308b<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>$ sudo apt-get install python3-tk<\/p>\n\n\n\n<p>\u3059\u3067\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3068\u30a8\u30e9\u30fc\u3092\u8fd4\u3055\u308c\u305f<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"pyenv%E3%82%92%E5%86%8D%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%97%E3%81%A6%E3%81%BF%E3%82%8B\"><\/span>pyenv\u3092\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u308b<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>$brew reinstall pyenv<\/p><\/blockquote>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u78ba\u8a8d\u3055\u308c\u305f\u3089\u305d\u306e\u307e\u307etcl-tk\u3092\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>brew install tcl-tk<\/p><\/blockquote>\n\n\n\n<p>\u305d\u3057\u305f\u3089python\u3092\u5165\u308c\u76f4\u3057\u3092\u884c\u3046\u81ea\u5206\u306e\u5834\u5408\u306f\u5909\u5316\u304c\u306a\u304b\u3063\u305f\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u304c\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3063\u3066\u3082\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u3053\u3068\u304c\u3042\u3063\u305f\u3089\u305c\u3072\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<script async=\"\" src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<!-- test -->\n<ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-7910153846163820\" data-ad-slot=\"9115942114\" data-ad-format=\"auto\" data-full-width-responsive=\"true\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>django\u3067\u30c6\u30b9\u30c8\u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u3092\u958b\u767a\u304c\u7d42\u308f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,14],"tags":[10],"class_list":["post-416","post","type-post","status-publish","format-standard","hentry","category-python","category-tkinter","tag-pythontkinter"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.sea2800.com\/index.php?rest_route=\/wp\/v2\/posts\/416","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sea2800.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sea2800.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sea2800.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sea2800.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=416"}],"version-history":[{"count":8,"href":"https:\/\/www.sea2800.com\/index.php?rest_route=\/wp\/v2\/posts\/416\/revisions"}],"predecessor-version":[{"id":630,"href":"https:\/\/www.sea2800.com\/index.php?rest_route=\/wp\/v2\/posts\/416\/revisions\/630"}],"wp:attachment":[{"href":"https:\/\/www.sea2800.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sea2800.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sea2800.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}