Hello all,
I am using polar2grid v2.3 on centos7.
When attempting to use gdal_merge.py I got an error from pkg manager saying it could not find GDAL 3.0.2.
After a while of experimenting I managed to get sqlite3, proj6 and finally GDAL v3.0.2 installed by compiling from source, but I am still getting errors. I am running on the same server as IPOPP.
Would anyone be kind enough to share their configurations (OS and dependent package installations) please, so I can follow the same and get gdal_merge.py working.
Thanks in advance.
Nik
GDAL 3.0.2 error when using gdal_merge.py
Re: GDAL 3.0.2 error when using gdal_merge.py
Hi Nik,
Is the error message you are getting:
To make direct calls to "gdal_merge.py" you'll need to "source" the Polar2Grid environment by doing:
Where is the path to the Polar2Grid installation. We may need to update our documentation to address this. Thank you for bringing it up. Let me know if you have any other questions.
Dave
Is the error message you are getting:
Code: Select all
pkg_resources.DistributionNotFound: The 'GDAL==3.0.2' distribution was not found and is required by the application
Code: Select all
source $POLAR2GRID_HOME/bin/env.sh
Code: Select all
$POLAR2GRID_HOME
Dave
Re: GDAL 3.0.2 error when using gdal_merge.py
Yes, that was exactly the error.
It now works after running the command you recommended:
Thank you so much!
For the sake of others I do recommend someone adds this line to the polar2grid documentation.... this one small line would have saved me days of pulling my hair out!
It now works after running the command you recommended:
Code: Select all
source $POLAR2GRID_HOME/bin/env.sh
For the sake of others I do recommend someone adds this line to the polar2grid documentation.... this one small line would have saved me days of pulling my hair out!
Re: GDAL 3.0.2 error when using gdal_merge.py
Hi Nik,
Sorry that this has been so frustrating for you. The reason we do not add sourcing the environmental variable script to the Polar2Grid installation instructions is that it adds the Polar2Grid/bin directory to the beginning of your $PATH. Since P2G is self-contained, meaning it includes all of the supporting libraries and binaries that it needs to execute, these may conflict with other programs that you may be using. In the past, we have had people who ran into problems when doing this. The most effective way to use the environment variable setting script in P2G is to use it in a individual terminal or script.
Good luck! Kathy
Sorry that this has been so frustrating for you. The reason we do not add sourcing the environmental variable script to the Polar2Grid installation instructions is that it adds the Polar2Grid/bin directory to the beginning of your $PATH. Since P2G is self-contained, meaning it includes all of the supporting libraries and binaries that it needs to execute, these may conflict with other programs that you may be using. In the past, we have had people who ran into problems when doing this. The most effective way to use the environment variable setting script in P2G is to use it in a individual terminal or script.
Good luck! Kathy