﻿{"id":6263,"date":"2018-09-06T05:50:15","date_gmt":"2018-09-06T03:50:15","guid":{"rendered":"http:\/\/www.sigterritoires.fr\/?p=6263"},"modified":"2018-10-17T12:04:09","modified_gmt":"2018-10-17T10:04:09","slug":"how-to-install-python-add-ons-for-arcgis-and-qgis","status":"publish","type":"post","link":"https:\/\/www.sigterritoires.fr\/index.php\/en\/how-to-install-python-add-ons-for-arcgis-and-qgis\/","title":{"rendered":"How to install Python add- ons for ArcGis and QGis"},"content":{"rendered":"\r\n\r\n\r\n\r\n\r\n<p>For those who are not familiar with the oddities related to the use of Python add- ons , the almost unavoidable pitfall \u00a0 installation of the module.<\/p>\r\n\r\n\r\n\r\n<p>You will find yourself with a .tar.gz file and then &#8230; not the least info about what to do with it.<\/p>\r\n\r\n\r\n\r\n<p>Here&rsquo;s how to proceed. It\u2019s not long, but I hope this is crystal-clear.<!--more--><\/p>\r\n\r\n\r\n\r\n<h2><strong>1-<\/strong> <strong>How to retrieve<\/strong> <strong>the<\/strong> <strong>directory<\/strong> <strong>containing<\/strong> <strong>the module<\/strong><\/h2>\r\n\r\n\r\n\r\n<p>The modules are intended to be installed with Linux; the tree structure will appear a little strange. You will perform two decompressions to do:<\/p>\r\n\r\n\r\n\r\n<p>The first one in the file downloaded name.tar.gz to find a directory name.tar<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"594\" height=\"404\" data-attachment-id=\"6265\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/how-to-install-python-add-ons-for-arcgis-and-qgis\/image-3\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/09\/image.png?fit=594%2C404&amp;ssl=1\" data-orig-size=\"594,404\" 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=\"image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/09\/image.png?fit=594%2C404&amp;ssl=1\" class=\"wp-image-6265\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/09\/image.png?resize=594%2C404&#038;ssl=1\" alt=\"\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/09\/image.png?w=594&amp;ssl=1 594w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/09\/image.png?resize=300%2C204&amp;ssl=1 300w\" sizes=\"auto, (max-width: 594px) 100vw, 594px\" \/><\/figure>\r\n\r\n\r\n\r\n<p>&nbsp;<\/p>\r\n\r\n\r\n\r\n\r\n\r\n<p>In this directory you will find a subdirectory <strong><em>dist<\/em><\/strong> and in this subdirectory a compressed file \u00a0<strong><em>tar<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p>The second decompression is that of this .tar file<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"594\" height=\"358\" data-attachment-id=\"6266\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/how-to-install-python-add-ons-for-arcgis-and-qgis\/image-4\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/09\/image-1.png?fit=594%2C358&amp;ssl=1\" data-orig-size=\"594,358\" 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=\"image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/09\/image-1.png?fit=594%2C358&amp;ssl=1\" class=\"wp-image-6266\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/09\/image-1.png?resize=594%2C358&#038;ssl=1\" alt=\"\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/09\/image-1.png?w=594&amp;ssl=1 594w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/09\/image-1.png?resize=300%2C181&amp;ssl=1 300w\" sizes=\"auto, (max-width: 594px) 100vw, 594px\" \/><\/figure>\r\n\r\n\r\n\r\n<p>&nbsp;<\/p>\r\n\r\n\r\n\r\n\r\n\r\n<p>Now you have to find the subdirectory containing the module itself.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"594\" height=\"276\" data-attachment-id=\"6267\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/how-to-install-python-add-ons-for-arcgis-and-qgis\/image-5\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/09\/image-2.png?fit=594%2C276&amp;ssl=1\" data-orig-size=\"594,276\" 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=\"image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/09\/image-2.png?fit=594%2C276&amp;ssl=1\" class=\"wp-image-6267\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/09\/image-2.png?resize=594%2C276&#038;ssl=1\" alt=\"\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/09\/image-2.png?w=594&amp;ssl=1 594w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2018\/09\/image-2.png?resize=300%2C139&amp;ssl=1 300w\" sizes=\"auto, (max-width: 594px) 100vw, 594px\" \/><\/figure>\r\n\r\n\r\n\r\n<p>&nbsp;<\/p>\r\n\r\n\r\n\r\n\r\n\r\n<p>Go down the tree until finding a directory with the name of the module <strong>WITHOUT<\/strong> the version number. It is next to another repertoire ending with <strong><em>egg-info.<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p>It is this directory that contains the Python module and that you have to copy in your Python installation so that ArcGis or QGis can use it.<\/p>\r\n\r\n\r\n\r\n<p>Now that we know what we have to copy, still remains to know <strong>Where to<\/strong> copy it.<\/p>\r\n\r\n\r\n\r\n<h2><strong>2-<\/strong> <strong>how to copy<\/strong> <strong>the module<\/strong> <strong>into<\/strong> <strong>your<\/strong> <strong>Python installation<\/strong><\/h2>\r\n\r\n\r\n\r\n<p>For the module to be recognized and used, must be copied into the directory <strong><em>Lib<\/em><\/strong> of the Python installation that you use. The problem is that even if you are not aware, you use for sure several installations!<\/p>\r\n\r\n\r\n\r\n<p>Let&rsquo;s do things as simply as possible.<\/p>\r\n\r\n\r\n\r\n<p><strong>If<\/strong> <strong>you<\/strong> <strong>install<\/strong> <strong>the<\/strong> <strong>module to be used<\/strong> <strong>with ArcGis<\/strong><\/p>\r\n\r\n\r\n\r\n<p>The Python installation known by ArcGis is located in the directory <strong><em>C: \/Python27\/ArcGIS10.X<\/em><\/strong> and <strong><em>C: \/Python27\/ArcGISx6410.X<\/em><\/strong> if you use the 64bit geprocessor.<\/p>\r\n\r\n\r\n\r\n<p>In each of these directories you have a directory <strong><em>Lib<\/em><\/strong>. Avoid possible problems: Copy your module in both.<\/p>\r\n\r\n\r\n\r\n<p><strong>If<\/strong> <strong>you<\/strong> <strong>install<\/strong> <strong>the<\/strong> <strong>module for<\/strong> <strong>use it<\/strong> <strong>with QGis<\/strong><\/p>\r\n\r\n\r\n\r\n<p>The Python installation known by QGis is located in the directory <strong><em>C: \\ Program Files \\ QGIS<\/em><\/strong> <strong><em>xxxx<\/em><\/strong> <strong><em>\\ apps \\ Python27.<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p>In this directory you will find the directory <strong>Lib<\/strong> . Copy the module into this directory.<\/p>\r\n\r\n\r\n\r\n<h3><strong>If<\/strong> <strong>you<\/strong> <strong>install<\/strong> <strong>the module to be used<\/strong> <strong>with Python consoles<\/strong> <strong>other<\/strong> <strong>than<\/strong> <strong>those<\/strong> <strong>used<\/strong> <strong>by ArcGis<\/strong> <strong>and<\/strong> <strong>QGis,<\/strong> <strong>the<\/strong> <strong>Python<\/strong> <strong>installation<\/strong> <strong>used<\/strong> <strong>is that<\/strong> <strong>of the<\/strong> <strong>root<\/strong> <strong>C: \/ Python27.<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>Copy the module into the directory <strong><em>C: \\ Python27 \\ Lib.<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p>If, as me, you have the three options you will understand the reluctance to install add- ons. With each new version it is uttermost important to remember updating all the installations &#8230;<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>For those who are not familiar with the oddities related to the use of Python add- ons , the almost unavoidable pitfall \u00a0 installation of the module. You will find yourself with a .tar.gz file and&hellip;<\/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":[1451,1453,1449,1386],"class_list":["post-6263","post","type-post","status-publish","format-standard","hentry","category-non-classe-en","tag-add_on","tag-arcgis-en","tag-python-en","tag-qgis-en"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p6XU0A-1D1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/6263","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=6263"}],"version-history":[{"count":0,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/6263\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/media?parent=6263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/categories?post=6263"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/tags?post=6263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}