[GRASS-dev] How to install grass development package

Hi everyone

Hope this email finds you well.

I installed a QGIS that includes GRASS from here [https://www.kyngchaos.com/software/qgis/]. The GRASS does not contain a g.extension to install grass addon. When I copy a g.extension from other grass installation. It complains “Please install GRASS development package”.

So my questions are:

  1. How to install GRASS addon without g.extension on MacOS

  2. How to install GRASS development packages on MacOS.

Many thanks for your help
Looking forward to hearing from you soon

Best regards

Ming

Hi,

you can try to install QGIS with all-in-one package (official), where g.extension is included. https://qgis.org/downloads/macos/nightly2/ are builds based on GDAL3 which I would try first.

Kind regards,
Peter

On Thu, Sep 3, 2020 at 8:35 PM ming han <dustming@gmail.com> wrote:

Hi everyone

Hope this email finds you well.

I installed a QGIS that includes GRASS from here [https://www.kyngchaos.com/software/qgis/]. The GRASS does not contain a g.extension to install grass addon. When I copy a g.extension from other grass installation. It complains “Please install GRASS development package”.

So my questions are:

  1. How to install GRASS addon without g.extension on MacOS

  2. How to install GRASS development packages on MacOS.

Many thanks for your help
Looking forward to hearing from you soon

Best regards

Ming


grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Hi everyone

Is GRASS76 in the QGIS compiled with python2? Because I got a new error which complains that “NameError:name ‘file’ is not defined”. While the file is used in python2.

image.png

Thanks
Ming

ming han <dustming@gmail.com> 于2020年9月3日周四 下午2:34写道:

Hi everyone

Hope this email finds you well.

I installed a QGIS that includes GRASS from here [https://www.kyngchaos.com/software/qgis/]. The GRASS does not contain a g.extension to install grass addon. When I copy a g.extension from other grass installation. It complains “Please install GRASS development package”.

So my questions are:

  1. How to install GRASS addon without g.extension on MacOS

  2. How to install GRASS development packages on MacOS.

Many thanks for your help
Looking forward to hearing from you soon

Best regards

Ming

Ming,

If you are interested in working with GRASS on mac you may try the official distribution, follow links on https://grass.osgeo.org/download/mac/ or go directly to http://grassmac.wikidot.com/downloads. It is an all-inclusive app, easy to install.

At this point I would recommend the GRASS 7.8.4 dev version. It is the latest version of the stable GRASS branch in combination with the most stable mac distribution. It includes e.g. python 3.7, gdal 3, proj 6.3 and pdal 2.1.

Regarding add-ons: there are two types, either python based or c/c++ based. The add-on source code is downloaded (with g.extension) and in the case of the c/c++ also compiled locally – for this reason Apple’s Command Line Tools need to be installed. See section "COMPILING GRASS EXTENSIONS” on http://grassmac.wikidot.com/downloads.

Note: if direct integration with QGIS is essential, the official mac binary is perhaps not be the solution for you.

Cheers,
Nicklas

On 3 Sep 2020, at 20:34, ming han <dustming@gmail.com> wrote:

Hi everyone

Hope this email finds you well.

I installed a QGIS that includes GRASS from here [https://www.kyngchaos.com/software/qgis/]. The GRASS does not contain a g.extension to install grass addon. When I copy a g.extension from other grass installation. It complains “Please install GRASS development package”.

So my questions are:

  1. How to install GRASS addon without g.extension on MacOS

  2. How to install GRASS development packages on MacOS.

Many thanks for your help
Looking forward to hearing from you soon

Best regards

Ming


grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Hello Ming

Yes, GRASS 7.6 is the last version with python 2, you should aim at grass 7.8 line. The current stable is grass 7.8.3. See here https://grass.osgeo.org/download/mac/. Dunno if that includes also grass-dev package though.

I hope someone using grass in mac can answer that

best,
Vero

El vie., 4 sept. 2020 a las 4:55, ming han (<dustming@gmail.com>) escribió:

Hi everyone

Is GRASS76 in the QGIS compiled with python2? Because I got a new error which complains that “NameError:name ‘file’ is not defined”. While the file is used in python2.

image.png

Thanks
Ming

ming han <dustming@gmail.com> 于2020年9月3日周四 下午2:34写道:

Hi everyone

Hope this email finds you well.

I installed a QGIS that includes GRASS from here [https://www.kyngchaos.com/software/qgis/]. The GRASS does not contain a g.extension to install grass addon. When I copy a g.extension from other grass installation. It complains “Please install GRASS development package”.

So my questions are:

  1. How to install GRASS addon without g.extension on MacOS

  2. How to install GRASS development packages on MacOS.

Many thanks for your help
Looking forward to hearing from you soon

Best regards

Ming


grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

you need to use QGIS nightly2 for grass with python3

On Fri, Sep 4, 2020 at 2:31 PM Veronica Andreo <veroandreo@gmail.com> wrote:

Hello Ming

Yes, GRASS 7.6 is the last version with python 2, you should aim at grass 7.8 line. The current stable is grass 7.8.3. See here https://grass.osgeo.org/download/mac/. Dunno if that includes also grass-dev package though.

I hope someone using grass in mac can answer that

best,
Vero

El vie., 4 sept. 2020 a las 4:55, ming han (<dustming@gmail.com>) escribió:

Hi everyone

Is GRASS76 in the QGIS compiled with python2? Because I got a new error which complains that “NameError:name ‘file’ is not defined”. While the file is used in python2.

image.png

Thanks
Ming

ming han <dustming@gmail.com> 于2020年9月3日周四 下午2:34写道:

Hi everyone

Hope this email finds you well.

I installed a QGIS that includes GRASS from here [https://www.kyngchaos.com/software/qgis/]. The GRASS does not contain a g.extension to install grass addon. When I copy a g.extension from other grass installation. It complains “Please install GRASS development package”.

So my questions are:

  1. How to install GRASS addon without g.extension on MacOS

  2. How to install GRASS development packages on MacOS.

Many thanks for your help
Looking forward to hearing from you soon

Best regards

Ming


grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev


grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Thanks Peter, I will try QGIS nightly2.

Peter Petrik <peter.petrik@lutraconsulting.co.uk> 于2020年9月4日周五 上午9:04写道:

you need to use QGIS nightly2 for grass with python3

On Fri, Sep 4, 2020 at 2:31 PM Veronica Andreo <veroandreo@gmail.com> wrote:

Hello Ming

Yes, GRASS 7.6 is the last version with python 2, you should aim at grass 7.8 line. The current stable is grass 7.8.3. See here https://grass.osgeo.org/download/mac/. Dunno if that includes also grass-dev package though.

I hope someone using grass in mac can answer that

best,
Vero

El vie., 4 sept. 2020 a las 4:55, ming han (<dustming@gmail.com>) escribió:

Hi everyone

Is GRASS76 in the QGIS compiled with python2? Because I got a new error which complains that “NameError:name ‘file’ is not defined”. While the file is used in python2.

image.png

Thanks
Ming

ming han <dustming@gmail.com> 于2020年9月3日周四 下午2:34写道:

Hi everyone

Hope this email finds you well.

I installed a QGIS that includes GRASS from here [https://www.kyngchaos.com/software/qgis/]. The GRASS does not contain a g.extension to install grass addon. When I copy a g.extension from other grass installation. It complains “Please install GRASS development package”.

So my questions are:

  1. How to install GRASS addon without g.extension on MacOS

  2. How to install GRASS development packages on MacOS.

Many thanks for your help
Looking forward to hearing from you soon

Best regards

Ming


grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev


grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Hi everyone

Thanks for all your help. Is it possible for me to build grass with a specific python version? And how to do that?

Thanks
Ming

Nicklas Larsson <n_larsson@yahoo.com> 于2020年9月4日周五 上午3:25写道:

Ming,

If you are interested in working with GRASS on mac you may try the official distribution, follow links on https://grass.osgeo.org/download/mac/ or go directly to http://grassmac.wikidot.com/downloads. It is an all-inclusive app, easy to install.

At this point I would recommend the GRASS 7.8.4 dev version. It is the latest version of the stable GRASS branch in combination with the most stable mac distribution. It includes e.g. python 3.7, gdal 3, proj 6.3 and pdal 2.1.

Regarding add-ons: there are two types, either python based or c/c++ based. The add-on source code is downloaded (with g.extension) and in the case of the c/c++ also compiled locally – for this reason Apple’s Command Line Tools need to be installed. See section "COMPILING GRASS EXTENSIONS” on http://grassmac.wikidot.com/downloads.

Note: if direct integration with QGIS is essential, the official mac binary is perhaps not be the solution for you.

Cheers,
Nicklas

On 3 Sep 2020, at 20:34, ming han <dustming@gmail.com> wrote:

Hi everyone

Hope this email finds you well.

I installed a QGIS that includes GRASS from here [https://www.kyngchaos.com/software/qgis/]. The GRASS does not contain a g.extension to install grass addon. When I copy a g.extension from other grass installation. It complains “Please install GRASS development package”.

So my questions are:

  1. How to install GRASS addon without g.extension on MacOS

  2. How to install GRASS development packages on MacOS.

Many thanks for your help
Looking forward to hearing from you soon

Best regards

Ming


grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Hi Ming,

On Sat, Sep 5, 2020 at 4:15 AM ming han <dustming@gmail.com> wrote:

Hi everyone

    Thanks for all your help. Is it possible for me to build grass with a specific python version? And how to do that?

Please see:
https://grass.osgeo.org/grass78/manuals/variables.html
-->

" List of selected (GRASS related) shell environment variables
  [ To be set from the terminal shell or startup scripts ]
  ...
  GRASS_PYTHON
  [wxGUI, Python Ctypes]
  set to override Python executable.
  On Mac OS X this should be the pythonw executable for the wxGUI to work.
"

HTH,
Markus

Hi Ming,

The bundled mac distributions are normally pre-packaged with all dependencies needed, including python. In those cases it is difficult to change python version.

Again, if you need close integration to QGIS, the following may not answer to your needs:

A standard unix-like build of GRASS is python version independent, which means it is enough to set the environment variable GRASS_PYTHON to the python binary of choice (e.g. GRASS_PYTHON=/usr/local/bin/python3.8). This also works on mac. The problem on Mac is how to deal with dependencies. I personally make use of MacPorts for GRASS development and testing. I first install GRASS with MacPorts, then I have the dependencies I need in /opt/local, which can be used for configure, make and make install [1].

Alternatively, you can build your own GRASS.app with grass-conda [2] building script. You can duplicate the default/conda-requirements-dev.txt, set appropriate python version and use the new file as --conda-file.

/ Nicklas

[1] https://grasswiki.osgeo.org/wiki/Compile_and_Install
[2] https://github.com/nilason/grass-conda

On Saturday, 5 September 2020, 04:15:17 CEST, ming han <dustming@gmail.com> wrote:

Hi everyone

Thanks for all your help. Is it possible for me to build grass with a specific python version? And how to do that?

Thanks
Ming

Hi Nicklas

Many thanks for your reply. I solve the problem by 1) configure the grass source code and then make. 2) modify the make.platform in the generated /include/Make folder. and then compile the grass addons for my QGIS GRASS with these files.

I guess following your suggestions install whole grass is a more clean solution to me. I will try that later.

Thanks again for all your kind support

Ming

Nicklas Larsson <n_larsson@yahoo.com> 于2020年9月7日周一 上午8:52写道:

Hi Ming,

The bundled mac distributions are normally pre-packaged with all dependencies needed, including python. In those cases it is difficult to change python version.

Again, if you need close integration to QGIS, the following may not answer to your needs:

A standard unix-like build of GRASS is python version independent, which means it is enough to set the environment variable GRASS_PYTHON to the python binary of choice (e.g. GRASS_PYTHON=/usr/local/bin/python3.8). This also works on mac. The problem on Mac is how to deal with dependencies. I personally make use of MacPorts for GRASS development and testing. I first install GRASS with MacPorts, then I have the dependencies I need in /opt/local, which can be used for configure, make and make install [1].

Alternatively, you can build your own GRASS.app with grass-conda [2] building script. You can duplicate the default/conda-requirements-dev.txt, set appropriate python version and use the new file as --conda-file.

/ Nicklas

[1] https://grasswiki.osgeo.org/wiki/Compile_and_Install
[2] https://github.com/nilason/grass-conda

On Saturday, 5 September 2020, 04:15:17 CEST, ming han <dustming@gmail.com> wrote:

Hi everyone

Thanks for all your help. Is it possible for me to build grass with a specific python version? And how to do that?

Thanks
Ming