Hi Stefan
Thanks for the reply. Sorry for the delay in response.
I solved it temporarily by asking the participants to install GRASS 7.8.5 into the OSGeo4W/apps folder and update the environment accordingly, and it worked.
But your solution of downloading the addon and extracting it to "C:\Users%USER%\AppData\Roaming\GRASS7\addons", is more elegant and it works.
I also support the additional feature of installing the addon in Windows.
Thanks again for pointing out “find_program”, it is the perfect solution to check if an addon is installed or not.
Best regards,
Sajid
On Mon, Aug 2, 2021 at 1:56 AM Stefan Blumentrath <Stefan.Blumentrath@nina.no> wrote:
Hi Sajid,
On Windows, addons are distributed as precompiled binaries for a specific version.
7.8.6 is just a release candidate, so there are no pre-compiled addons yet.
With OSGeo4W Version 1, which you can get here:
https://download.osgeo.org/osgeo4w/osgeo4w-setup-x86-v1.exe
you can get GRASS 7.8.5 where installation of addons works fine.
In order to make addons work for GRASS 7.8.6 we would first need a release and then packaging of addons for that version. So no quick fix.
As a workaround you could download the required addons for GRASS 7.8.5 and ask your students to extract them into their user profile, which is typically:
C:\Users%USER%\AppData\Roaming\GRASS7\addons\
That is a hack of course but should work (though I have not tested)…
As for your related questions:
- Might be a good idea to support installation of addons from local zip files. At least for Python scripts that should generally work. There is already a similar feature request in here: https://github.com/OSGeo/grass/issues/625#issuecomment-797414504…
- Not sure I understand the question correctly, but you could check if an addon is present (e.g. with https://grass.osgeo.org/grass79/manuals/libpython/script.html?highlight=find_#script.core.find_program)
Hope that helps a bit (though it may be late for your course).
Cheers
Stefan
Fra: grass-user <grass-user-bounces@lists.osgeo.org> på vegne av Sajid Pareeth <spareeth@gmail.com>
Sendt: torsdag 29. juli 2021 16:48
Til: GRASS user list <grass-user@lists.osgeo.org>
Emne: [GRASS-user] Error with installing addons in Windows
Dear all
While installing an addon using g.extension in Windows 10, gives the following error.
"ERROR: Cannot open URL:
http://wingrass.fsv.cvut.cz/grass78/x86_64/addons/grass-7.8.6RC1/r.series.lwr.zip"
I see that the addons for 7.8.5 are accessible: http://wingrass.fsv.cvut.cz/grass78/x86_64/addons/grass-7.8.5RC1/r.series.lwr.zip ; But not accessible for 7.8.6RC1.
The latest OSGeo4W setup gives two GRASS GIS versions: 7.8.6RC1-4 and 7.8.6RC1-5.
So there is no option to install 7.8.5 using OSGeo4W.
Any quick work around for this issue? I am in the middle of providing training, and it would be great if there is a quick fix.
Related questions:
-
Is there any way to install an addon from a local zip package or url in Windows? In the manual it says it works only for Linux and Mac.
-
Is there any way to skip installation of an addon, if it is already installed? Useful within a python script.
Many thanks in advance
Best
Sajid