For those who are not familiar with the oddities related to the use of Python adds on, the almost unavoidable is the module installation.
You will find yourself with a .tar.gz file and then … not a clue of what to do with it.
Here’s how to proceed. It’s not long, but I hope it is crystal clear.
1- How to retrieve the directory containing the module
The Linux modules you are intending to install depicts a tree structure that looks a little strange. You have to execute two decompressions:
The first one is the downloaded file called .tar.gz to find a directory nom.tar
In this repertoire you will find a sub directory dist and a compressed file .tar. The second decompression has to be performed in the latter file (.tar)
Now you must find the sub directory containing the module itself .
Go down the tree until you find a directory sharing the folder name WITHOUT the version number. It is located next to another folder whose ending is egg-info.
It is this folder 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 has to be copied, it, 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 it must be copied into the folder Lib of the Python installation that you use .
The problem is that even if you are not aware of, you are using, definitely, several installations!
Let’s do things as simply as possible.
If you install the module to use it with ArcGis
The Python installation known by ArcGis is located in the folder C:/Python27/ArcGIS10.X and C:/Python27/ArcGISx6410.X if you are using the 64bit processor.
In each of these directories you have a Lib.folder. Do not worry: copy your module in both.
If you install the module to use it with QGis
The Python installation known by QGis is located in the folder C: \ Program Files \ QGIS xxxx \ apps \ Python27.
In this folder you will find the Lib. folder. Copy the folder into this directory.
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.
Copy the folder into the directory C: \ Python27 \ Lib.
If, as me, you have the three options you will understand the reluctance to install adds-on. With each new version it is important to remember to update all the installations …