﻿{"id":5808,"date":"2018-07-27T02:49:28","date_gmt":"2018-07-27T00:49:28","guid":{"rendered":"http:\/\/www.sigterritoires.fr\/?p=5808"},"modified":"2018-10-17T12:59:25","modified_gmt":"2018-10-17T10:59:25","slug":"how-to-install-python-adds-on-for-arcgis-and-qgis","status":"publish","type":"post","link":"https:\/\/www.sigterritoires.fr\/index.php\/en\/how-to-install-python-adds-on-for-arcgis-and-qgis\/","title":{"rendered":"How to install Python adds-on for ArcGis and QGis"},"content":{"rendered":"<p>For\u00a0those\u00a0who\u00a0are\u00a0not\u00a0familiar\u00a0with\u00a0the oddities\u00a0related\u00a0to\u00a0the use\u00a0of Python\u00a0adds\u00a0on,\u00a0the almost\u00a0unavoidable\u00a0is\u00a0the module installation.<\/p>\n<p>You\u00a0will\u00a0find\u00a0yourself with\u00a0a\u00a0.tar.gz\u00a0file\u00a0and\u00a0then\u00a0&#8230; not a clue of what\u00a0to\u00a0do with it.<\/p>\n<p>Here&rsquo;s\u00a0how to\u00a0proceed.\u00a0It\u2019s\u00a0not long,\u00a0but\u00a0I\u00a0hope\u00a0it\u00a0is\u00a0crystal clear.<!--more--><\/p>\n<p><strong>1-<\/strong>\u00a0<strong>How to<\/strong> <strong>retrieve<\/strong>\u00a0<strong>the<\/strong>\u00a0<strong>directory<\/strong>\u00a0<strong>containing<\/strong>\u00a0<strong>the module<\/strong><\/p>\n<p>The Linux modules\u00a0you are intending to\u00a0install depicts a tree structure that looks\u00a0 a\u00a0little\u00a0strange.\u00a0You\u00a0have to execute\u00a0two\u00a0decompressions:<\/p>\n<p>The first\u00a0one\u00a0is the\u00a0downloaded\u00a0file called .tar.gz to\u00a0find\u00a0a\u00a0directory\u00a0nom.tar<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"5809\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/how-to-install-python-adds-on-for-arcgis-and-qgis\/lib1\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/07\/lib1.png?fit=630%2C428&amp;ssl=1\" data-orig-size=\"630,428\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"lib1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/07\/lib1.png?fit=630%2C428&amp;ssl=1\" class=\"alignnone size-medium wp-image-5809\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/07\/lib1-300x204.png?resize=300%2C204\" alt=\"\" width=\"300\" height=\"204\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/07\/lib1.png?resize=300%2C204&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/07\/lib1.png?w=630&amp;ssl=1 630w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>In this repertoire you will find a sub directory <strong><em>dist <\/em><\/strong>and a compressed file <strong><em>.tar. <\/em><\/strong>The\u00a0second\u00a0decompression\u00a0has to be performed in the latter file (<strong><em>.tar<\/em><\/strong>)<\/p>\n<p>Now you\u00a0must\u00a0find\u00a0the sub directory containing\u00a0the module\u00a0itself\u00a0.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"5810\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/how-to-install-python-adds-on-for-arcgis-and-qgis\/lib2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/07\/lib2.png?fit=630%2C293&amp;ssl=1\" data-orig-size=\"630,293\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"lib2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/07\/lib2.png?fit=630%2C293&amp;ssl=1\" class=\"alignnone size-medium wp-image-5810\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/07\/lib2-300x140.png?resize=300%2C140\" alt=\"\" width=\"300\" height=\"140\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/07\/lib2.png?resize=300%2C140&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/07\/lib2.png?w=630&amp;ssl=1 630w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Go down\u00a0the tree\u00a0until\u00a0you find\u00a0a\u00a0directory\u00a0sharing the folder name<strong>\u00a0<\/strong><strong>WITHOUT\u00a0<\/strong><strong>\u00a0<\/strong>\u00a0the\u00a0version\u00a0number.\u00a0It\u00a0is\u00a0located next\u00a0to\u00a0another\u00a0folder\u00a0whose ending is\u00a0<strong><em>egg-info.<\/em><\/strong><\/p>\n<p>It is\u00a0this\u00a0folder that\u00a0contains\u00a0the Python module and that\u00a0you\u00a0have to\u00a0copy\u00a0in\u00a0your\u00a0Python installation so that ArcGis\u00a0or\u00a0QGis\u00a0can\u00a0use it\u00a0.<\/p>\n<p>Now\u00a0that we\u00a0know what has to be copied,\u00a0it, still, remains\u00a0to know\u00a0<strong>\u00a0<\/strong>\u00a0<strong>Where <\/strong>to\u00a0copy it.<\/p>\n<p><strong>2-<\/strong>\u00a0<strong>How to copy<\/strong>\u00a0<strong>the module<\/strong>\u00a0<strong>into<\/strong>\u00a0<strong>your<\/strong>\u00a0<strong>Python installation<\/strong><\/p>\n<p>For the module to\u00a0be\u00a0recognized\u00a0and\u00a0used\u00a0it\u00a0must be\u00a0copied\u00a0into\u00a0the\u00a0folder\u00a0<strong><em>Lib<\/em><\/strong>\u00a0of\u00a0the\u00a0Python\u00a0installation\u00a0that\u00a0you\u00a0use\u00a0.<\/p>\n<p>The problem is that\u00a0even\u00a0if\u00a0you\u00a0are not aware of,\u00a0you\u00a0are using, definitely, several\u00a0installations!<\/p>\n<p>Let&rsquo;s\u00a0do things as\u00a0simply as\u00a0possible.<\/p>\n<p><strong>If<\/strong>\u00a0<strong>you<\/strong>\u00a0<strong>install<\/strong>\u00a0<strong>the<\/strong>\u00a0<strong>module to<\/strong>\u00a0<strong>use it<\/strong>\u00a0<strong>with ArcGis<\/strong><\/p>\n<p>The\u00a0Python\u00a0installation known by ArcGis\u00a0is\u00a0located\u00a0in\u00a0the folder\u00a0<strong><em>C:\/Python27\/ArcGIS10.X<\/em><\/strong>\u00a0\u00a0\u00a0and\u00a0\u00a0\u00a0<strong><em>C:\/Python27\/ArcGISx6410.X<\/em><\/strong>\u00a0if\u00a0you\u00a0are using\u00a0the\u00a064bit\u00a0processor.<\/p>\n<p>In\u00a0each\u00a0of\u00a0these\u00a0directories\u00a0you\u00a0have\u00a0a\u00a0<strong><em>Lib<\/em><\/strong>.folder. Do not worry:\u00a0copy\u00a0your\u00a0module\u00a0in\u00a0both.<\/p>\n<p><strong>If<\/strong>\u00a0<strong>you<\/strong>\u00a0<strong>install<\/strong>\u00a0<strong>the<\/strong>\u00a0<strong>module to<\/strong>\u00a0<strong>use it<\/strong>\u00a0<strong>with QGis<\/strong><\/p>\n<p>The Python installation known by QGis is located in the folder <strong><em>C: \\ Program Files \\ QGIS<\/em><\/strong>\u00a0<strong><em>xxxx<\/em><\/strong>\u00a0<strong><em>\\ apps \\ Python27.<\/em><\/strong><\/p>\n<p>In\u00a0this\u00a0folder\u00a0you will\u00a0find\u00a0the\u00a0<strong>Lib<\/strong>. folder. \u00a0Copy\u00a0the folder\u00a0into\u00a0this\u00a0directory.<\/p>\n<p><strong>If you install the module to use with Python consoles other than those used by ArcGis and QGis, the Python installation used is that of the root C: \/ Python27.<\/strong><\/p>\n<p>Copy\u00a0the folder\u00a0into\u00a0the\u00a0directory\u00a0\u00a0\u00a0<strong><em>C: \\ Python27 \\ Lib.<\/em><\/strong><\/p>\n<p>If,\u00a0as\u00a0me,\u00a0you\u00a0have\u00a0the three options\u00a0you will\u00a0understand\u00a0the\u00a0reluctance\u00a0to install adds-on.\u00a0With\u00a0each\u00a0new version\u00a0it is\u00a0important\u00a0to\u00a0remember\u00a0to\u00a0update\u00a0all\u00a0the installations &#8230;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For\u00a0those\u00a0who\u00a0are\u00a0not\u00a0familiar\u00a0with\u00a0the oddities\u00a0related\u00a0to\u00a0the use\u00a0of Python\u00a0adds\u00a0on,\u00a0the almost\u00a0unavoidable\u00a0is\u00a0the module installation. You\u00a0will\u00a0find\u00a0yourself with\u00a0a\u00a0.tar.gz\u00a0file\u00a0and\u00a0then\u00a0&#8230; not a clue of what\u00a0to\u00a0do with it. Here&rsquo;s\u00a0how to\u00a0proceed.\u00a0It\u2019s\u00a0not long,\u00a0but\u00a0I\u00a0hope\u00a0it\u00a0is\u00a0crystal clear.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"give_campaign_id":0,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sfsi_plus_gutenberg_text_before_share":"","sfsi_plus_gutenberg_show_text_before_share":"","sfsi_plus_gutenberg_icon_type":"","sfsi_plus_gutenberg_icon_alignemt":"","sfsi_plus_gutenburg_max_per_row":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1260],"tags":[],"class_list":["post-5808","post","type-post","status-publish","format-standard","hentry","category-non-classe-en"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p6XU0A-1vG","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/5808","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/comments?post=5808"}],"version-history":[{"count":0,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/5808\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/media?parent=5808"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/categories?post=5808"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/tags?post=5808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}