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:
How to install GRASS addon without g.extension on MacOS
How to install GRASS development packages on MacOS.
Many thanks for your help
Looking forward to hearing from you soon
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.
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:
How to install GRASS addon without g.extension on MacOS
How to install GRASS development packages on MacOS.
Many thanks for your help
Looking forward to hearing from you soon
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.
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:
How to install GRASS addon without g.extension on MacOS
How to install GRASS development packages on MacOS.
Many thanks for your help
Looking forward to hearing from you soon
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.
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:
How to install GRASS addon without g.extension on MacOS
How to install GRASS development packages on MacOS.
Many thanks for your help
Looking forward to hearing from you soon
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.
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:
How to install GRASS addon without g.extension on MacOS
How to install GRASS development packages on MacOS.
Many thanks for your help
Looking forward to hearing from you soon
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.
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:
How to install GRASS addon without g.extension on MacOS
How to install GRASS development packages on MacOS.
Many thanks for your help
Looking forward to hearing from you soon
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.
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:
How to install GRASS addon without g.extension on MacOS
How to install GRASS development packages on MacOS.
Many thanks for your help
Looking forward to hearing from you soon
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.
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:
How to install GRASS addon without g.extension on MacOS
How to install GRASS development packages on MacOS.
Many thanks for your help
Looking forward to hearing from you soon
" 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.
"
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.
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.
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.