For those who are not familiar with the oddities related to the use of Python add- ons , the almost unavoidable pitfall installation of the module.
You will find yourself with a .tar.gz file and then … not the least info about what to do with it.
Here’s how to proceed. It’s not long, but I hope this is crystal-clear.
1- How to retrieve the directory containing the module
The modules are intended to be installed with Linux; the tree structure will appear a little strange. You will perform two decompressions to do:
The first one in the file downloaded name.tar.gz to find a directory name.tar
In this directory you will find a subdirectory dist and in this subdirectory a compressed file tar
The second decompression is that of this .tar file
Now you have to find the subdirectory containing the module itself.
Go down the tree until finding a directory with the name of the module WITHOUT the version number. It is next to another repertoire ending with egg-info.
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.
Now that we know what we have to copy, still remains to know Where to copy it.
2- how to copy the module into your Python installation
For the module to be recognized and used, must be copied into the directory Lib of the Python installation that you use. The problem is that even if you are not aware, you use for sure several installations!
Let’s do things as simply as possible.
If you install the module to be used with ArcGis
The Python installation known by ArcGis is located in the directory C: /Python27/ArcGIS10.X and C: /Python27/ArcGISx6410.X if you use the 64bit geprocessor.
In each of these directories you have a directory Lib. Avoid possible problems: Copy your module in both.
If you install the module for use it with QGis
The Python installation known by QGis is located in the directory C: \ Program Files \ QGIS xxxx \ apps \ Python27.
In this directory you will find the directory Lib . Copy the module into this directory.
If you install the module to be used with Python consoles other than those used by ArcGis and QGis, the Python installation used is that of the root C: / Python27.
Copy the module into the directory C: \ Python27 \ Lib.
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 …