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 <dustm...@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

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

Reply via email to