{"id":23211,"date":"2021-08-18T07:45:42","date_gmt":"2021-08-17T22:45:42","guid":{"rendered":"https:\/\/www.souichi.club\/?p=23211"},"modified":"2022-03-19T17:22:01","modified_gmt":"2022-03-19T08:22:01","slug":"graphviz-pydot","status":"publish","type":"post","link":"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/","title":{"rendered":"Installing PyDotPlus and Graphviz"},"content":{"rendered":"<ul class=\"bogo-language-switcher list-view\"><li class=\"en-US en current first\"><span class=\"bogoflags bogoflags-us\"><\/span> <span class=\"bogo-language-name\"><a rel=\"alternate\" hreflang=\"en-US\" href=\"https:\/\/www.souichi.club\/en\/wp-json\/wp\/v2\/posts\/23211\/\" title=\"English\" class=\"current\" aria-current=\"page\">English<\/a><\/span><\/li>\n<li class=\"ja last\"><span class=\"bogoflags bogoflags-jp\"><\/span> <span class=\"bogo-language-name\"><a rel=\"alternate\" hreflang=\"ja\" href=\"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/posts\/23211\/\" title=\"Japanese\">\u65e5\u672c\u8a9e<\/a><\/span><\/li>\n<\/ul>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a3c03d5996c6\" 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: #454e5c;color:#454e5c\" 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: #454e5c;color:#454e5c\" 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-6a3c03d5996c6\"  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.souichi.club\/en\/deep-learning\/graphviz-pydot\/#What_is_Graphviz\" >What is Graphviz?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/#Environment\" >Environment<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/#Installing_Graphviz\" >Installing Graphviz<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/#Download\" >Download<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/#Run_the_installer\" >Run the installer<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/#Operation_check\" >Operation check<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/#Installing_PyDotPlus\" >Installing PyDotPlus<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/#Source_code\" >Source code<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_Graphviz\"><\/span>What is Graphviz?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>I used Graphviz to diagram the model of a Deep Learning network in Python.<\/p>\n\n\n\n<p>Graphviz is an open source tool developed by AT&amp;T Labs to draw graph structures written in DOT language.<\/p>\n\n\n\n<p>In order to use Grapviz with python, you need to install PyDot as a set.<\/p>\n\n\n\n<p>However, PyDot is no longer under development, so I installed its successor, PyDotPlus.<\/p>\n\n\n\n<p>Python \u2192 PyDotPlus \u2192 DOT language \u2192 Graphviz \u2192 Charts<\/p>\n\n\n\n<p>The above flow produced a png file with the following Deep Learning model diagram.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-01.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-01.png?resize=327%2C719&#038;ssl=1\" alt=\"Model diagram drawn by Graphviz.\" class=\"wp-image-23186\" width=\"327\" height=\"719\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-01.png?w=436&amp;ssl=1 436w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-01.png?resize=136%2C300&amp;ssl=1 136w\" sizes=\"auto, (max-width: 327px) 100vw, 327px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Environment\"><\/span>Environment<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Environment is as follows.<\/p>\n\n\n<table class=\"r_table01\">\n<tbody>\n<tr>\n<td class=\"r_td30\">\n<p>OS<\/p>\n<\/td>\n<td>\n<p>Windows 10 Home\uff0864 Bit\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Anaconda<\/p>\n<\/td>\n<td>\n<p>Anaconda Navigator 2.0.3<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Python<\/p>\n<\/td>\n<td>\n<p>Python 3.8.5<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Installing_Graphviz\"><\/span>Installing Graphviz<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>First, install Graphviz.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Download\"><\/span>Download<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Go to the<a href=\"http:\/\/www.graphviz.org\/download\/\" target=\"_blank\" rel=\"noreferrer noopener\"> Graphviz download page<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-02.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-02.png?resize=768%2C357&#038;ssl=1\" alt=\"Download page of graphviz\" class=\"wp-image-23191\" width=\"768\" height=\"357\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-02.png?resize=1024%2C476&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-02.png?resize=300%2C140&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-02.png?resize=768%2C357&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-02.png?resize=1536%2C714&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-02.png?w=1901&amp;ssl=1 1901w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<p>Scroll down to the bottom and download the installer for Windows 10 (64-bit).<\/p>\n\n\n\n<p>In addition to Windows, the following operating systems are also available<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Linux<\/li><li>Mac<\/li><li>Solaris<\/li><li>Other Linux\uff08FreeBSD\uff09<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-04.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-04.png?resize=768%2C357&#038;ssl=1\" alt=\"Windows10 64bit\u7248\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u30fc\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\" class=\"wp-image-23193\" width=\"768\" height=\"357\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-04.png?resize=1024%2C476&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-04.png?resize=300%2C140&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-04.png?resize=768%2C357&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-04.png?resize=1536%2C714&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-04.png?w=1901&amp;ssl=1 1901w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Run_the_installer\"><\/span>Run the installer<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Run the exe file downloaded.<\/p>\n\n\n\n<p>The setup wizard will appear and click &#8220;Next.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-01.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-01.png?resize=465%2C364&#038;ssl=1\" alt=\"graphviz\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u30a6\u30a3\u30b6\u30fc\u30c9\" class=\"wp-image-23215\" width=\"465\" height=\"364\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-01.png?w=620&amp;ssl=1 620w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-01.png?resize=300%2C235&amp;ssl=1 300w\" sizes=\"auto, (max-width: 465px) 100vw, 465px\" \/><\/a><\/figure>\n\n\n\n<p>Review the license agreement and click the &#8220;I agree&#8221; button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-02.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-02.png?resize=467%2C363&#038;ssl=1\" alt=\"Check the license agreement.\" class=\"wp-image-23216\" width=\"467\" height=\"363\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-02.png?w=623&amp;ssl=1 623w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-02.png?resize=300%2C233&amp;ssl=1 300w\" sizes=\"auto, (max-width: 467px) 100vw, 467px\" \/><\/a><\/figure>\n\n\n\n<p>Select &#8220;Add Graphviz to the system PATH for all users&#8221; and click the &#8220;Next&#8221; button.<\/p>\n\n\n\n<p>The path of the bin folder where Graphviz is installed will be added to the PATH environment variable.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-03.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-03.png?resize=467%2C363&#038;ssl=1\" alt=\"Adding the PATH\" class=\"wp-image-23217\" width=\"467\" height=\"363\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-03.png?w=622&amp;ssl=1 622w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-03.png?resize=300%2C233&amp;ssl=1 300w\" sizes=\"auto, (max-width: 467px) 100vw, 467px\" \/><\/a><\/figure>\n\n\n\n<p>Confirm the destination folder and click the &#8220;Next&#8221; button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-04.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-04.png?resize=467%2C363&#038;ssl=1\" alt=\"Select the destination folder.\" class=\"wp-image-23218\" width=\"467\" height=\"363\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-04.png?w=623&amp;ssl=1 623w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-04.png?resize=300%2C233&amp;ssl=1 300w\" sizes=\"auto, (max-width: 467px) 100vw, 467px\" \/><\/a><\/figure>\n\n\n\n<p>Select the Start menu folder and click the &#8220;Install&#8221; button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-05.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-05.png?resize=467%2C362&#038;ssl=1\" alt=\"Select the Start menu folder and click the &quot;Install&quot; button.\" class=\"wp-image-23219\" width=\"467\" height=\"362\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-05.png?w=622&amp;ssl=1 622w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-05.png?resize=300%2C233&amp;ssl=1 300w\" sizes=\"auto, (max-width: 467px) 100vw, 467px\" \/><\/a><\/figure>\n\n\n\n<p>When the installation is finished, click the &#8220;Finish&#8221; button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-06.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-06.png?resize=466%2C364&#038;ssl=1\" alt=\"Completing Graphviz Setup\" class=\"wp-image-23220\" width=\"466\" height=\"364\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-06.png?w=621&amp;ssl=1 621w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-en-06.png?resize=300%2C234&amp;ssl=1 300w\" sizes=\"auto, (max-width: 466px) 100vw, 466px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Operation_check\"><\/span>Operation check<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>From the command prompt, go to C:\\Program Files\\Graphviz\\bin and execute the following command.<\/p>\n\n\n\n<p>Ver 2.48.0 (20210717.1556) has been installed.<\/p>\n\n\n<pre><code class=\"lang-shell\">dot -V<\/code><\/pre>\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-11.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-11.png?resize=359%2C61&#038;ssl=1\" alt=\"\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u78ba\u8a8d\" class=\"wp-image-23200\" width=\"359\" height=\"61\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-11.png?w=478&amp;ssl=1 478w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-11.png?resize=300%2C51&amp;ssl=1 300w\" sizes=\"auto, (max-width: 359px) 100vw, 359px\" \/><\/a><\/figure>\n\n\n\n<p>If the PATH to C:\\Program Files\\Graphviz\\bin exists, there is no need to move the current directory.<\/p>\n\n\n\n<p>If not, add the PATH manually.<\/p>\n\n\n\n<p>This completes the installation of Graphviz.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Installing_PyDotPlus\"><\/span>Installing PyDotPlus<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The next step is to install PyDotPlus, which outputs the DOT language from Python.<\/p>\n\n\n\n<p>I installed it from the command prompt with the following command.<\/p>\n\n\n<pre><code class=\"lang-shell\">pip3 install pydotplus<\/code><\/pre>\n\n\n<p>For Python 3.x-only environments, use the pip command as well.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-12.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-12.png?resize=768%2C401&#038;ssl=1\" alt=\"Install pydotplus\" class=\"wp-image-23203\" width=\"768\" height=\"401\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-12.png?resize=1024%2C535&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-12.png?resize=300%2C157&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-12.png?resize=768%2C402&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-12.png?w=1222&amp;ssl=1 1222w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<p>This completes the installation of PyDotPlus.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Source_code\"><\/span>Source code<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The following is an excerpt of the source code for the part that displays the model diagram.<\/p>\n\n\n<pre class=\"line-numbers\"><code class=\"lang-python\">from IPython.display import Image\n\nf_model = model.get_static_model()\nFILENAME = 'model-dl.png';\ntf.keras.utils.plot_model(f_model, show_shapes=True, show_layer_names=True, to_file=FILENAME)\nImage(retina=False, filename=FILENAME) # drawing<\/code><\/pre>\n\n\n<p>I was able to confirm that Graphviz outputs the aforementioned model diagram of Deep Learning from Python.<\/p>\n\n\n<div class=\"postscript_balloon\">Finally.<\/div>\n\n\n<p>I hope this article will be useful to someone somewhere.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I installed PyDotPlus and Graphviz on Windows 10 with Python 3.8.5. Graphviz is an open source tool for drawing graph structures written in DOT language.<\/p>\n","protected":false},"author":5,"featured_media":23186,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_locale":"en_US","_original_post":"https:\/\/www.souichi.club\/?p=23184","_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[154],"tags":[],"class_list":["post-23211","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-deep-learning","en-US"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"robots\" content=\"max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n\t<meta name=\"author\" content=\"souichirou kikuchi\"\/>\n\t<meta name=\"google-site-verification\" content=\"I8SUoF98Rb8nTRkWlwcAUglH3v2Z49ZUmVL8-hWcBds\" \/>\n\t<meta name=\"msvalidate.01\" content=\"621A4EE09A712013B79161DEF6085174\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"\u305d\u3046\u5099\u5fd8\u9332 note to self\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Installing PyDotPlus and Graphviz | \u305d\u3046\u5099\u5fd8\u9332\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/\" \/>\n\t\t<meta property=\"fb:admins\" content=\"222762298621510\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-01.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-01.png\" \/>\n\t\t<meta property=\"og:image:width\" content=\"436\" \/>\n\t\t<meta property=\"og:image:height\" content=\"959\" \/>\n\t\t<meta property=\"article:tag\" content=\"deep learning\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2021-08-17T22:45:42+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-03-19T08:22:01+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sou.bibouroku\/\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/kikuchi.souichiro\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@soukikuchi175\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Installing PyDotPlus and Graphviz | \u305d\u3046\u5099\u5fd8\u9332\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@soukikuchi175\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-01.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/deep-learning\\\/graphviz-pydot\\\/#article\",\"name\":\"Installing PyDotPlus and Graphviz | \\u305d\\u3046\\u5099\\u5fd8\\u9332\",\"headline\":\"Installing PyDotPlus and Graphviz\",\"author\":{\"@id\":\"https:\\\/\\\/www.souichi.club\\\/author\\\/souwpuser023en\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.souichi.club\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.souichi.club\\\/wp-content\\\/uploads\\\/graphviz-pydot-01.png?fit=436%2C959&ssl=1\",\"width\":436,\"height\":959},\"datePublished\":\"2021-08-18T07:45:42+09:00\",\"dateModified\":\"2022-03-19T17:22:01+09:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/deep-learning\\\/graphviz-pydot\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/deep-learning\\\/graphviz-pydot\\\/#webpage\"},\"articleSection\":\"Deep Learning\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/deep-learning\\\/graphviz-pydot\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.souichi.club#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.souichi.club\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/category\\\/deep-learning\\\/#listItem\",\"name\":\"Deep Learning\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/category\\\/deep-learning\\\/#listItem\",\"position\":2,\"name\":\"Deep Learning\",\"item\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/category\\\/deep-learning\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/deep-learning\\\/graphviz-pydot\\\/#listItem\",\"name\":\"Installing PyDotPlus and Graphviz\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.souichi.club#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/deep-learning\\\/graphviz-pydot\\\/#listItem\",\"position\":3,\"name\":\"Installing PyDotPlus and Graphviz\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/category\\\/deep-learning\\\/#listItem\",\"name\":\"Deep Learning\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/#person\",\"name\":\"souichirou\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/deep-learning\\\/graphviz-pydot\\\/#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/13f7f455b0e5efb64918fd4bc46f81ae8232f37679b7b638f53ac198086d1422?s=96&r=g\",\"width\":96,\"height\":96,\"caption\":\"souichirou\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/kikuchi.souichirou\",\"@soukikuchi175\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/author\\\/souwpuser023en\\\/#author\",\"url\":\"https:\\\/\\\/www.souichi.club\\\/author\\\/souwpuser023en\\\/\",\"name\":\"souichirou kikuchi\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/deep-learning\\\/graphviz-pydot\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ae74b378502f0f972ee51f5bed6a401be64ea02df531d9a86cf4cbdd7d68861e?s=96&r=g\",\"width\":96,\"height\":96,\"caption\":\"souichirou kikuchi\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/kikuchi.souichiro\",\"@soukikuchi175\"]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/deep-learning\\\/graphviz-pydot\\\/#webpage\",\"url\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/deep-learning\\\/graphviz-pydot\\\/\",\"name\":\"Installing PyDotPlus and Graphviz | \\u305d\\u3046\\u5099\\u5fd8\\u9332\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.souichi.club\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/deep-learning\\\/graphviz-pydot\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.souichi.club\\\/author\\\/souwpuser023en\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.souichi.club\\\/author\\\/souwpuser023en\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.souichi.club\\\/wp-content\\\/uploads\\\/graphviz-pydot-01.png?fit=436%2C959&ssl=1\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/deep-learning\\\/graphviz-pydot\\\/#mainImage\",\"width\":436,\"height\":959},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/deep-learning\\\/graphviz-pydot\\\/#mainImage\"},\"datePublished\":\"2021-08-18T07:45:42+09:00\",\"dateModified\":\"2022-03-19T17:22:01+09:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/#website\",\"url\":\"https:\\\/\\\/www.souichi.club\\\/\",\"name\":\"\\u305d\\u3046\\u5099\\u5fd8\\u9332\",\"description\":\"note to self\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.souichi.club\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Installing PyDotPlus and Graphviz | \u305d\u3046\u5099\u5fd8\u9332","description":"","canonical_url":"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/","robots":"max-snippet:-1, max-image-preview:large, max-video-preview:-1","keywords":"","webmasterTools":{"google-site-verification":"I8SUoF98Rb8nTRkWlwcAUglH3v2Z49ZUmVL8-hWcBds","msvalidate.01":"621A4EE09A712013B79161DEF6085174","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/#article","name":"Installing PyDotPlus and Graphviz | \u305d\u3046\u5099\u5fd8\u9332","headline":"Installing PyDotPlus and Graphviz","author":{"@id":"https:\/\/www.souichi.club\/author\/souwpuser023en\/#author"},"publisher":{"@id":"https:\/\/www.souichi.club\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-01.png?fit=436%2C959&ssl=1","width":436,"height":959},"datePublished":"2021-08-18T07:45:42+09:00","dateModified":"2022-03-19T17:22:01+09:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/#webpage"},"isPartOf":{"@id":"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/#webpage"},"articleSection":"Deep Learning"},{"@type":"BreadcrumbList","@id":"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.souichi.club#listItem","position":1,"name":"Home","item":"https:\/\/www.souichi.club","nextItem":{"@type":"ListItem","@id":"https:\/\/www.souichi.club\/en\/category\/deep-learning\/#listItem","name":"Deep Learning"}},{"@type":"ListItem","@id":"https:\/\/www.souichi.club\/en\/category\/deep-learning\/#listItem","position":2,"name":"Deep Learning","item":"https:\/\/www.souichi.club\/en\/category\/deep-learning\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/#listItem","name":"Installing PyDotPlus and Graphviz"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.souichi.club#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/#listItem","position":3,"name":"Installing PyDotPlus and Graphviz","previousItem":{"@type":"ListItem","@id":"https:\/\/www.souichi.club\/en\/category\/deep-learning\/#listItem","name":"Deep Learning"}}]},{"@type":"Person","@id":"https:\/\/www.souichi.club\/#person","name":"souichirou","image":{"@type":"ImageObject","@id":"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/13f7f455b0e5efb64918fd4bc46f81ae8232f37679b7b638f53ac198086d1422?s=96&r=g","width":96,"height":96,"caption":"souichirou"},"sameAs":["https:\/\/www.facebook.com\/kikuchi.souichirou","@soukikuchi175"]},{"@type":"Person","@id":"https:\/\/www.souichi.club\/author\/souwpuser023en\/#author","url":"https:\/\/www.souichi.club\/author\/souwpuser023en\/","name":"souichirou kikuchi","image":{"@type":"ImageObject","@id":"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/ae74b378502f0f972ee51f5bed6a401be64ea02df531d9a86cf4cbdd7d68861e?s=96&r=g","width":96,"height":96,"caption":"souichirou kikuchi"},"sameAs":["https:\/\/www.facebook.com\/kikuchi.souichiro","@soukikuchi175"]},{"@type":"WebPage","@id":"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/#webpage","url":"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/","name":"Installing PyDotPlus and Graphviz | \u305d\u3046\u5099\u5fd8\u9332","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.souichi.club\/#website"},"breadcrumb":{"@id":"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/#breadcrumblist"},"author":{"@id":"https:\/\/www.souichi.club\/author\/souwpuser023en\/#author"},"creator":{"@id":"https:\/\/www.souichi.club\/author\/souwpuser023en\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-01.png?fit=436%2C959&ssl=1","@id":"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/#mainImage","width":436,"height":959},"primaryImageOfPage":{"@id":"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/#mainImage"},"datePublished":"2021-08-18T07:45:42+09:00","dateModified":"2022-03-19T17:22:01+09:00"},{"@type":"WebSite","@id":"https:\/\/www.souichi.club\/#website","url":"https:\/\/www.souichi.club\/","name":"\u305d\u3046\u5099\u5fd8\u9332","description":"note to self","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.souichi.club\/#person"}}]},"og:locale":"en_US","og:site_name":"\u305d\u3046\u5099\u5fd8\u9332 note to self","og:type":"article","og:title":"Installing PyDotPlus and Graphviz | \u305d\u3046\u5099\u5fd8\u9332","og:url":"https:\/\/www.souichi.club\/en\/deep-learning\/graphviz-pydot\/","fb:admins":"222762298621510","og:image":"https:\/\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-01.png","og:image:secure_url":"https:\/\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-01.png","og:image:width":436,"og:image:height":959,"article:tag":["deep learning"],"article:published_time":"2021-08-17T22:45:42+00:00","article:modified_time":"2022-03-19T08:22:01+00:00","article:publisher":"https:\/\/www.facebook.com\/sou.bibouroku\/","article:author":"https:\/\/www.facebook.com\/kikuchi.souichiro","twitter:card":"summary_large_image","twitter:site":"@soukikuchi175","twitter:title":"Installing PyDotPlus and Graphviz | \u305d\u3046\u5099\u5fd8\u9332","twitter:creator":"@soukikuchi175","twitter:image":"https:\/\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-01.png"},"aioseo_meta_data":{"post_id":"23211","title":null,"description":null,"keywords":null,"keyphrases":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_custom_image_width":null,"og_custom_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"none","tabs":null,"priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"created":"2023-08-23 22:57:28","updated":"2026-05-21 03:47:28","primary_term":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"twitter_image_url":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"limit_modified_date":false,"ai":null,"seo_analyzer_scan_date":null},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/graphviz-pydot-01.png?fit=436%2C959&ssl=1","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/posts\/23211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/comments?post=23211"}],"version-history":[{"count":1,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/posts\/23211\/revisions"}],"predecessor-version":[{"id":24524,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/posts\/23211\/revisions\/24524"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/media\/23186"}],"wp:attachment":[{"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/media?parent=23211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/categories?post=23211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/tags?post=23211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}