This article describes how inAnacondaenvironment, based on the.whl
file installationPythonIntermediate and advanced geographic data-processing librariesGDAL
The methodology.
In a previous post, we described the process of creating an application based on theconda install
command to install directly over the networkGDAL
library method; however, as shown below, this method ofEnvironment ConfigurationThe process is very slow and sometimes there are conflicts between different third-party libraries, so it's not a very good approach.
Therefore, in this paper, we present the results based on the.whl
file to quickly configureGDAL
The library approach.
It is important to mention at the outset that in earlier times (probably2023
years ago), it is possible to start with aWindowsPlatform categoriesPythonthird-party repository.whl
documentationCompilation Sitesto downloadGDAL
(used form a nominal expression).whl
file, as shown below.
However, the above site has since been shut down, so it will be necessary to visit anothernode, as shown in the figure below.
Subsequently, in "Assets", select "Show all XXX assets" option, as shown below.
Find what we need hereGDAL
library version of the.whl
file will suffice. Note here that the individual.whl
file, the first string of numbers before it indicates theGDAL
version of the library.cp
followed by a number indicatingPythonversion, the finalwin32
together withamd64
represent respectively32
Bit system with64
bit system. For example, I have here thePythonThe version is3.9.1
and the computer is64
bit, so just choose the one with thecp39
cap (a poem)amd64
model or template.whl
Documentation is sufficient.
Subsequently, download.whl
file and place it under a certain path.
Afterwards, open "Anaconda Prompt (anaconda3)"Software.
and go to where we've just stored the.whl
file in the path of the file. For example, I'm accessing it here via the following code:
cd C:\GDAL_P39
Then press the Enter key as shown below.
Next, typepip install
and followed by the one you just downloaded..whl
The full name of the file. For example, I need to enter here:
pip install GDAL-3.4.3-cp39-cp39-win_amd64.whl
Then press the Enter key as shown below.
If the screen as shown above appears, it indicates that we have completed theGDAL
The configuration of the library works; we can continue to work on the "Anaconda Prompt (anaconda3)" in which the success of the configuration work is tested.
We enter the following code on the command line:
python
Afterwards, enter the following code:
from osgeo import gdal
If the interface shown below appears after entering the above two codes (i.e., no error message pops up), it means that theGDAL
The library has been configured successfully.
At this point, the job is done.