﻿{"id":2574,"date":"2015-10-22T08:08:36","date_gmt":"2015-10-22T06:08:36","guid":{"rendered":"http:\/\/www.sigterritoires.fr\/?p=2574"},"modified":"2015-10-22T08:08:36","modified_gmt":"2015-10-22T06:08:36","slug":"comment-installer-des-modules-complementaires-python-pour-arcgis-et-qgis","status":"publish","type":"post","link":"https:\/\/www.sigterritoires.fr\/index.php\/comment-installer-des-modules-complementaires-python-pour-arcgis-et-qgis\/","title":{"rendered":"Comment installer des modules compl\u00e9mentaires Python pour ArcGis et QGis"},"content":{"rendered":"<p>Pour ceux qui ne sont pas familiers des bizarreries li\u00e9es \u00e0 l&rsquo;utilisation de modules compl\u00e9mentaires de Python, l\u2019\u00e9cueil presque incontournable\u00a0 est l&rsquo;installation du module.<\/p>\n<p>Vous vous trouvez avec un fichier .tar.gz et puis&#8230; pas la moindre info de quoi en faire.<\/p>\n<p>Voici comment proc\u00e9der. Ce n&rsquo;est pas long, mais j&rsquo;esp\u00e8re que ce sera clair.<!--more--><\/p>\n<h2>1- R\u00e9cup\u00e9rer le r\u00e9pertoire contenant le module<\/h2>\n<p>Les modules \u00e9tant pr\u00e9vus pour \u00eatre install\u00e9s sous Linux, l&rsquo;arborescence va vous para\u00eetre un peu \u00e9trange. Vous aurez deux d\u00e9compressions \u00e0 faire:<\/p>\n<p>La premi\u00e8re celle du fichier t\u00e9l\u00e9charg\u00e9 nom.tar.gz pour retrouver un r\u00e9pertoire nom.tar<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py1.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2576\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/comment-installer-des-modules-complementaires-python-pour-arcgis-et-qgis\/py1\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py1.png?fit=796%2C541&amp;ssl=1\" data-orig-size=\"796,541\" 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=\"py1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py1.png?fit=630%2C428&amp;ssl=1\" class=\"aligncenter size-large wp-image-2576\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py1-630x428.png?resize=630%2C428\" alt=\"d\u00e9compression gz\" width=\"630\" height=\"428\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py1.png?resize=630%2C428&amp;ssl=1 630w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py1.png?resize=300%2C204&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py1.png?w=796&amp;ssl=1 796w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/a><\/p>\n<p>Dans ce r\u00e9pertoire vous aurez un sous-r\u00e9pertoire <em><strong>dist<\/strong><\/em> et dans ce sous-r\u00e9pertoire un fichier compress\u00e9 <em><strong>.tar<\/strong><\/em><\/p>\n<p>La deuxi\u00e8me d\u00e9compression est celle de ce fichier .tar<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py2.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2577\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/comment-installer-des-modules-complementaires-python-pour-arcgis-et-qgis\/py2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py2.png?fit=978%2C590&amp;ssl=1\" data-orig-size=\"978,590\" 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=\"py2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py2.png?fit=630%2C380&amp;ssl=1\" class=\"aligncenter size-large wp-image-2577\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py2-630x380.png?resize=630%2C380\" alt=\"d\u00e9compression ;tar\" width=\"630\" height=\"380\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py2.png?resize=630%2C380&amp;ssl=1 630w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py2.png?resize=300%2C181&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py2.png?w=978&amp;ssl=1 978w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/a>Maintenant il faut trouver le sous-r\u00e9pertoire contenant le module proprement dit.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py3.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2578\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/comment-installer-des-modules-complementaires-python-pour-arcgis-et-qgis\/py3-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py3.png?fit=844%2C392&amp;ssl=1\" data-orig-size=\"844,392\" 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=\"py3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py3.png?fit=630%2C293&amp;ssl=1\" class=\"aligncenter size-large wp-image-2578\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py3-630x293.png?resize=630%2C293\" alt=\"r\u00e9pertoire du module python\" width=\"630\" height=\"293\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py3.png?resize=630%2C293&amp;ssl=1 630w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py3.png?resize=300%2C139&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2015\/10\/py3.png?w=844&amp;ssl=1 844w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/a>Descendez l&rsquo;arborescence jusqu&rsquo;\u00e0 trouver un r\u00e9pertoire avec le nom du module<strong> SANS<\/strong> le num\u00e9ro de version. Il se trouve \u00e0 c\u00f4t\u00e9 d&rsquo;un autre r\u00e9pertoire finissant par <em><strong>egg-info.<\/strong><\/em><\/p>\n<p>C&rsquo;est ce r\u00e9pertoire qui contient le module Python et que vous devez copier dans votre installation Python pour que ArcGis ou QGis puissent l&rsquo;utiliser.<\/p>\n<p>Maintenant que nous savons ce qu&rsquo;il faut copier, reste \u00e0 savoir<strong> O\u00f9<\/strong> le copier.<\/p>\n<h2>2- copier le module dans votre installation Python<\/h2>\n<p>Pour que le module soit reconnu et utilis\u00e9, il faut le copier dans le r\u00e9pertoire <em><strong>Lib<\/strong><\/em> de l&rsquo;installation Python que vous utilisez. Le probl\u00e8me c&rsquo;est que, m\u00eame si vous ne le savez pas, vous utilisez \u00e0 coup s\u00fbr plusieurs installations!<\/p>\n<p>Faisons les choses le plus simplement possible.<\/p>\n<h3>Si vous installez le module pour l&rsquo;utiliser avec ArcGis<\/h3>\n<p>L&rsquo;installation Python connue par ArcGis se trouve dans le r\u00e9pertoire <em><strong>C:\/Python27\/ArcGIS10.X<\/strong><\/em> et <em><strong>C:\/Python27\/ArcGISx6410.X<\/strong><\/em> si vous utilisez le geprocesseur 64bits.<\/p>\n<p>Dans chacun de ces r\u00e9pertoires vous avez un r\u00e9pertoire <em><strong>Lib<\/strong><\/em>. \u00c9vitez les soucis: copiez votre module dans les deux.<\/p>\n<h3>Si vous installez le module pour l&rsquo;utiliser avec QGis<\/h3>\n<p>L&rsquo;installation Python connue par QGis se trouve dans le r\u00e9pertoire <em><strong>C:\\Program Files\\QGIS xxxx\\apps\\Python27.<\/strong><\/em><\/p>\n<p>Dans ce r\u00e9pertoire vous trouverez le r\u00e9pertoire <strong>Lib<\/strong>. Copiez le module dans ce r\u00e9pertoire.<\/p>\n<h3>Si vous installez le module pour l&rsquo;utiliser avec des consoles Python autres que celles utilis\u00e9es par ArcGis et QGis, l&rsquo;installation Python utilis\u00e9e est celle de la racine C:\/Python27.<\/h3>\n<p>Copiez le module dans le r\u00e9pertoire <em><strong>C:\\Python27\\Lib.<\/strong><\/em><\/p>\n<p>Si, comme moi, vous avez les trois options, vous comprendrez la r\u00e9ticence \u00e0 installer des modules compl\u00e9mentaires. A chaque nouvelle version il faut surtout pas oublier de mettre \u00e0 jour toutes les installations&#8230;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pour ceux qui ne sont pas familiers des bizarreries li\u00e9es \u00e0 l&rsquo;utilisation de modules compl\u00e9mentaires de Python, l\u2019\u00e9cueil presque incontournable\u00a0 est l&rsquo;installation du module. Vous vous trouvez avec un fichier .tar.gz et puis&#8230; pas la moindre&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_post_was_ever_published":false,"_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":""},"categories":[209,222],"tags":[15,73,278,131,58],"class_list":["post-2574","post","type-post","status-publish","format-standard","hentry","category-arcgisqgis","category-python","tag-arcgis","tag-installation","tag-module-complementaire","tag-python","tag-qgis"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p6XU0A-Fw","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/2574","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=2574"}],"version-history":[{"count":0,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/2574\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/media?parent=2574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/categories?post=2574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/tags?post=2574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}