{"id":3720,"date":"2018-05-27T16:35:07","date_gmt":"2018-05-27T07:35:07","guid":{"rendered":"https:\/\/www.ws-meguro.com\/\/?p=3720"},"modified":"2018-05-27T18:36:15","modified_gmt":"2018-05-27T09:36:15","slug":"python%e3%81%aegui%e5%8c%96%e3%81%a8%e3%81%97%e3%81%a6kivy%e3%82%92%e8%a9%a6%e3%81%99","status":"publish","type":"post","link":"https:\/\/www.wsmeguro.jp\/wp\/?p=3720","title":{"rendered":"Python\u306eGUI\u5316\u3068\u3057\u3066Kivy\u3092\u8a66\u3059"},"content":{"rendered":"<p>\u5225\u306bJavaScript\u304c\u96e3\u3057\u304b\u3063\u305f\u308f\u3051\u3067\u306f\u306a\u3044\u3067\u3059\u304c\u3001\u8272\u3005\u3068\u3084\u3063\u3066\u3044\u308b\u3046\u3061\u306b\u3001<iframe style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=masuday55cm-22&#038;o=9&#038;p=8&#038;l=as4&#038;m=amazon&#038;f=ifr&#038;ref=as_ss_li_til&#038;asins=4774188190&#038;linkId=af28d98c00fd925d53b275bbc0256d9b\"><\/iframe>\u3053\u3093\u306a\u672c\u3092\u8aad\u307f\u3060\u3057\u3066\u3001\u6c17\u304c\u3064\u3044\u305f\u3089JavaScript\u304c\u76ee\u7684\u306b\u306a\u3063\u3066\u3044\u305f\u3002<br \/>\n\u672c\u6765\u306e\u76ee\u7684\u306f\u3001Python\u3092GUI\u3067\u7f8e\u3057\u304f\u8868\u793a\u3059\u308b\u3053\u3068\u3060\u3063\u305f\u3068\u601d\u3044\u51fa\u3057\u3001\u3053\u308c\u3092\u52c9\u5f37\u3059\u308b\u304f\u3089\u3044\u306a\u3089\u3001\u5225\u306e\u65b9\u6cd5\u304c\u306a\u3044\u304b\u3068\u8abf\u3079\u308b\u3068\u3001\u300c<a href=\"https:\/\/kivy.org\/#home\" rel=\"noopener\" target=\"_blank\">Kivy<\/a>\u300d\u3068\u3044\u3046\u306e\u304c\u3042\u3063\u305f\u3002<a href=\"https:\/\/pyky.github.io\/kivy-doc-ja\/guide\/basic.html\" rel=\"noopener\" target=\"_blank\">\u65e5\u672c\u8a9e\u306f\u3053\u3061\u3089<\/a><!--more--><\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u624b\u3053\u305a\u3063\u305f\u3051\u3069\u3001\u3053\u3093\u306a\u611f\u3058\u3067\u3059\u3002<br \/>\n1.\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n<a href=\"https:\/\/kivy.org\/#download\" rel=\"noopener\" target=\"_blank\">\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30b5\u30a4\u30c8<\/a>\u304b\u3089\u9069\u5207\u306a\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3002\u305d\u308c\u305e\u308c\u3001\u8aac\u660e\u306e\u30da\u30fc\u30b8\u304c\u53f3\u5074\u306b\u3042\u308b\u306e\u3067\u3001\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u305d\u306e\u30da\u30fc\u30b8\u306e\u6307\u793a\u306b\u5f93\u3046\u3060\u3051\u3067\u3059\u304c\u3001\u300cNavigate to the latest Kivy release at https:\/\/kivy.org\/downloads\/ and download Kivy-*-osx-python*.dmg.\u300d\u306f\u4e0d\u8981\u3067\u3059\u3002\u3082\u3046\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3042\u308a\u307e\u3059\u3002<br \/>\n\u3082\u3046\u4e00\u3064\u6ce8\u610f\u306f\u3001\u4ee5\u4e0b\u306e\u3068\u3053\u308d\u3067\u3001\u300cMakeSymLinks\u300d\u306f\u5fc5\u305a\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059<br \/>\n<a href=\"https:\/\/www.wsmeguro.jp\/\/wp\/wp-content\/uploads\/2018\/05\/16a227eb3a67a6243e5e59f09865d1b8.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.wsmeguro.jp\/\/wp\/wp-content\/uploads\/2018\/05\/16a227eb3a67a6243e5e59f09865d1b8.png\" alt=\"\" width=\"551\" height=\"399\" class=\"aligncenter size-full wp-image-3721\" srcset=\"https:\/\/www.wsmeguro.jp\/wp\/wp-content\/uploads\/2018\/05\/16a227eb3a67a6243e5e59f09865d1b8.png 551w, https:\/\/www.wsmeguro.jp\/wp\/wp-content\/uploads\/2018\/05\/16a227eb3a67a6243e5e59f09865d1b8-300x217.png 300w\" sizes=\"auto, (max-width: 551px) 100vw, 551px\" \/><\/a><br \/>\n\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u304c\u30d6\u30ed\u30c3\u30af\u3057\u305f\u3089\u3001\u30b7\u30b9\u30c6\u30e0\u74b0\u5883\u8a2d\u5b9a\u3092\u958b\u3044\u3066\u3001\u52d5\u304b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>2.\u30c6\u30b9\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0<br \/>\n\u307e\u305a\u3001main.py\u3092\u3053\u3093\u306a\u611f\u3058\u3067\u3002<\/p>\n<pre class=\"lang:python decode:true \" >import kivy\r\nkivy.require('1.10.0')\r\n\r\nfrom kivy.app import App\r\nfrom kivy.uix.label import Label\r\n\r\nclass HelloApp(App):\r\n\r\n    def build(self):\r\n        return Label()\r\n\r\nif __name__ == '__main__':\r\n    HelloApp().run()<\/pre>\n<p>\u305d\u3057\u3066\u3001hello.kv\u3092\u3053\u3093\u306a\u611f\u3058\u3067\u3002<\/p>\n<pre class=\"lang:python decode:true \" >#:kivy 1.10.0\r\n \r\n&lt;Label&gt;:\r\n    text: 'Hello World'<\/pre>\n<p>kv\u30d5\u30a1\u30a4\u30eb\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u306f\u3001main.py\u306e\u30af\u30e9\u30b9HelloApp\u304b\u3089App\u3092\u53d6\u308a\u9664\u3044\u3066\u3001\u5c0f\u6587\u5b57\u306b\u3057\u305f\u3082\u306e\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u307f\u305f\u3044\u3067\u3059\u3002<\/p>\n<p>3.\u8d77\u52d5<br \/>\nVS Code\u3060\u3068\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u958b\u3044\u3066\u305d\u306e\u307e\u307e\u8d77\u52d5\u3067\u304d\u307e\u3059\u3002\u4fbf\u5229\u3067\u3059\u3002<br \/>\n<a href=\"https:\/\/www.wsmeguro.jp\/\/wp\/wp-content\/uploads\/2018\/05\/6d53c9135147c53fde72d2bd248bfbbe.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.wsmeguro.jp\/\/wp\/wp-content\/uploads\/2018\/05\/6d53c9135147c53fde72d2bd248bfbbe.png\" alt=\"\" width=\"801\" height=\"662\" class=\"aligncenter size-full wp-image-3722\" srcset=\"https:\/\/www.wsmeguro.jp\/wp\/wp-content\/uploads\/2018\/05\/6d53c9135147c53fde72d2bd248bfbbe.png 801w, https:\/\/www.wsmeguro.jp\/wp\/wp-content\/uploads\/2018\/05\/6d53c9135147c53fde72d2bd248bfbbe-300x248.png 300w, https:\/\/www.wsmeguro.jp\/wp\/wp-content\/uploads\/2018\/05\/6d53c9135147c53fde72d2bd248bfbbe-768x635.png 768w\" sizes=\"auto, (max-width: 801px) 100vw, 801px\" \/><\/a><\/p>\n<pre class=\"lang:python decode:true \" >kivy main.py<\/pre>\n<p>\u3053\u308c\u3067\u3001\u52d5\u304d\u307e\u3059\u3002<\/p>\n<p>4.\u305d\u306e\u753b\u9762<br \/>\n<a href=\"https:\/\/www.wsmeguro.jp\/\/wp\/wp-content\/uploads\/2018\/05\/faad23ed0e82ed106b59c1d14dbf2d2a.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.wsmeguro.jp\/\/wp\/wp-content\/uploads\/2018\/05\/faad23ed0e82ed106b59c1d14dbf2d2a.png\" alt=\"\" width=\"802\" height=\"626\" class=\"aligncenter size-full wp-image-3723\" srcset=\"https:\/\/www.wsmeguro.jp\/wp\/wp-content\/uploads\/2018\/05\/faad23ed0e82ed106b59c1d14dbf2d2a.png 802w, https:\/\/www.wsmeguro.jp\/wp\/wp-content\/uploads\/2018\/05\/faad23ed0e82ed106b59c1d14dbf2d2a-300x234.png 300w, https:\/\/www.wsmeguro.jp\/wp\/wp-content\/uploads\/2018\/05\/faad23ed0e82ed106b59c1d14dbf2d2a-768x599.png 768w\" sizes=\"auto, (max-width: 802px) 100vw, 802px\" \/><\/a><\/p>\n<p>\u3068\u306a\u3063\u3066\u5b8c\u6210\u3002<\/p>\n<p><del datetime=\"2018-05-27T08:58:51+00:00\">\u3042\u3068\u3067\u3001Windows\u3067\u3082\u8a66\u3057\u3066\u307f\u3088\u3046\u3002<\/del><\/p>\n<p>Windows\u3067\u306e\u5834\u5408\u306f\u3001\u3053\u308c\u3067\u52d5\u3044\u305f\u3002\u3059\u3079\u3066\u3001VS Code\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u5b9f\u65bd\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"lang:python decode:true \" >\/\/1.pip\u3068wheel\u306e\u66f4\u65b0\r\npython -m pip install --upgrade pip wheel setuptools\r\n\r\n\/\/2.\u4f9d\u5b58\r\npython -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew\r\npython -m pip install kivy.deps.gstreamer\r\n\r\n\/\/Python\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c3.5\u4ee5\u4e0a\u306e\u5834\u5408\u306f\u3084\u3063\u305f\u307b\u3046\u304c\u3044\u3044\u307f\u305f\u3044\r\npython -m pip install kivy.deps.angle\r\n\r\n\/\/3.\uff08\u3088\u3046\u3084\u304f\uff09Kivy\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\r\npython -m pip install kivy\r\n\r\n\/\/4.\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\r\npython -m pip install kivy_examples\r\n\r\n\/\/5.\u5b9f\u884c\r\npython main.py<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5225\u306bJavaScript\u304c\u96e3\u3057\u304b\u3063\u305f\u308f\u3051\u3067\u306f\u306a\u3044\u3067\u3059\u304c\u3001\u8272\u3005\u3068\u3084\u3063\u3066\u3044\u308b\u3046\u3061\u306b\u3001\u3053\u3093\u306a\u672c\u3092\u8aad\u307f\u3060\u3057\u3066\u3001\u6c17\u304c\u3064\u3044\u305f\u3089JavaScript\u304c\u76ee\u7684\u306b\u306a\u3063\u3066\u3044\u305f\u3002 \u672c\u6765\u306e\u76ee\u7684\u306f\u3001Python\u3092GUI\u3067\u7f8e\u3057\u304f\u8868\u793a\u3059\u308b\u3053\u3068\u3060\u3063\u305f\u3068\u601d&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[526,505],"tags":[564,563,527],"class_list":["post-3720","post","type-post","status-publish","format-standard","hentry","category-python","category-programming","tag-gui","tag-kivy","tag-python"],"_links":{"self":[{"href":"https:\/\/www.wsmeguro.jp\/wp\/index.php?rest_route=\/wp\/v2\/posts\/3720","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsmeguro.jp\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsmeguro.jp\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsmeguro.jp\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsmeguro.jp\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3720"}],"version-history":[{"count":5,"href":"https:\/\/www.wsmeguro.jp\/wp\/index.php?rest_route=\/wp\/v2\/posts\/3720\/revisions"}],"predecessor-version":[{"id":3728,"href":"https:\/\/www.wsmeguro.jp\/wp\/index.php?rest_route=\/wp\/v2\/posts\/3720\/revisions\/3728"}],"wp:attachment":[{"href":"https:\/\/www.wsmeguro.jp\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsmeguro.jp\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsmeguro.jp\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}