[GRASS-dev] GRASS GIS installation on Mac OSX [was : Re: [GRASS GIS] #2942: Startup after Novice Install]

Anna Petrášová kratochanna at gmail.com
Wed Jun 28 21:09:31 PDT 2017


On Wed, Jun 28, 2017 at 3:17 AM, Rainer Krug <rainer_krug at icloud.com> wrote:
>
> On 27 Jun 2017, at 14:32, Anna Petrášová <kratochanna at gmail.com> wrote:
>
> On Tue, Jun 27, 2017 at 3:26 AM, Moritz Lennert
> <mlennert at club.worldonline.be> wrote:
>
> On 27/06/17 01:02, GRASS GIS wrote:
>
>
> #2942: Startup after Novice Install
> ------------------------+-------------------------
>  Reporter:  pactriglo  |      Owner:  grass-dev@…
>      Type:  defect     |     Status:  new
>  Priority:  normal     |  Milestone:  7.0.6
> Component:  Startup    |    Version:  7.0.3
> Resolution:             |   Keywords:
>       CPU:  OSX/Intel  |   Platform:  MacOSX
> ------------------------+-------------------------
>
> Comment (by annakrat):
>
> Use homebrew from osgeo4mac:
>
> {{{
> brew tap osgeo/osgeo4mac
> brew install grass7
> }}}
>
> --
> Ticket URL: <https://trac.osgeo.org/grass/ticket/2942#comment:5>
> GRASS GIS <https://grass.osgeo.org>
>
>
>
> Is this the official recommendation on how to install GRASS GIS on Mac OSX
> these days ?
>
>
> I was recommending this way in our recent workshops because it's the
> only way which works with SIP enabled. It's far from ideal because it
> doesn't always work, sometimes people have several Python
> installations on Mac which complicates things
>
>
> I have the system python, Python 2 (home-brew) and python-3 (also home-brew
> install), and it installs without problems. Maybe because I have the hebrew
> python install.
>
> It usually get’s tricky if you are mixing different approaches of installing
> programs (same on Linux). That is the reason why, where possible, am using
> home-brew. I have, for example, no idea how home-brew / grass works together
> with python installed via the apple way go MacPorts. This is something which
> should be asked on the home-brew mailing list, or better, stackexchange.
>

also people have Anaconda these days. You have to be careful about the
order of Pythons in your PATH. (It sort of brings the actual meaning
of word python to my mind...)

Related to this, GRASS uses GRASS_PYTHON to force which Python is used.

> and for some reason, ctypes don't work there (so no PyGRASS or digitizer or
> 3D view).
>
>
> Never used them, but how can I test? Could you give me an example and I
> could try on my machine.

Pretty simple, run any of the examples here:

https://grass.osgeo.org/grass73/manuals/libpython/pygrass_vector.html


The rest is to be tested in the GUI, digitizer and 3D view are
switched on in Map Display.



>
> And the installation takes time on slower computers because it's compiling
> everything.
>
>
> Actually, there is a bottle (binary) available for grass 7 Sierra
>
> 09:02:43 ~$ brew info grass7
> osgeo/osgeo4mac/grass7: stable 7.2.0 (bottled)
> Geographic Resources Analysis Support System
> http://grass.osgeo.org/
> /usr/local/Cellar/grass7/7.2.0 (3,751 files, 69.6MB) *
>   Poured from bottle on 2017-06-28 at 08:54:11
> From:
> https://github.com/osgeo/homebrew-osgeo4mac/blob/master/Formula/grass7.rb
> ==> Dependencies
> Build: pkg-config ✔
> Required: gettext ✔, readline ✔, flex ✔, bison ✔, lbzip2 ✔, gdal2 ✔, libtiff
> ✔, unixodbc ✔, fftw ✔, wxpython ✔, cairo ✔, ghostscript ✔
> Optional: openblas ✔, liblas ✔, netcdf ✔, ffmpeg ✔
> ==> Requirements
> Required: unlinkedgrass7 ✘, python ✔, numpy (python module) ✔, x11 ✔
> Optional: postgresql ✔, mysql ✔
> ==> Options
> --with-ffmpeg
> Build with ffmpeg support
> --with-gdal-1
> Build with GDAL/OGR v1.x instead of v2.x
> --with-liblas
> Build with liblas support
> --with-mysql
> Build with mysql support
> --with-netcdf
> Build with netcdf support
> --with-openblas
> Build with openblas support
> --with-postgresql
> Build with postgresql support
> --without-gui
> Build without WxPython interface. Command line tools still available.
> 09:03:02 ~$
>
>
> I just re-installed it. If you use non-default options, grass7 get’s usually
> compiled - that is correct.

I see. On a recent workshop we did, a lot of people had problems with
installing GRASS with homebrew, and the most annoying part was that
they had all kinds of errors and we were able to figure out only some
of them.

>
>
> Michael's binaries work only when SIP is disabled. It's fairly easy to
> disable it, but still, you have to boot into recovery system, open
> command line and run a command there, so it looks little scary for
> most people.
>
>
> Absolutely - It makes sense to have SIP, and I am not prepared to disable it
> if I can avoid it - which I can by using homebrew.
>
>
> Even your own compilation is fairly difficult, one reason is that
> official wxPython 3 mac package is old and new macs refuse to open and
> install. So in general I am getting sick of this issue and
> unfortunately I don't have time nor knowledge to do anything about it.
>
>
> You are running into the same problems as with the pre-build binaries from
> Michael. I managed to get it to compile and run, but it was hackisch and not
> all features worked - so no options. If you gave instructions once on this
> mailing list but don’t have the mails at hand.

I used this:
https://stackoverflow.com/a/34622956/1058453

I haven't tried the new wxPython Phoenix on Mac yet.

>
> My students with MacOSX have been a bit confused about the different ways to
> download GRASS GIS, especially when they were trying to install it in
> parallel with QGIS for cross-usage (grass plugin and processing toolbox).
>
>
> this is something I haven't even tried. If some of your students find
> better ways of installing GRASS, let me know.
>
>
> As far as I know, you have to install both via home-brew (and if you are
> mentioning the long compilation times of GRASS, start the compilation of
> QGIS in home-brew in the evening! QGIS is beast to install via homebrew).
>
> But: I haven’t used QGIS in a long time.
>
> So to sum up:
>
> 1) mixed installs (Apple;e approach (.pkg, .dmg, Frameworks, …) combined
> with home-brew, you likely will have problems.
> 2) grass 7 installs via home-brew from a binary on Sierra without
> compilation
> 3) QGIS - grass under home-brew should work if both are installed under
> home-brew, otherwise ask on the QGIS mailing list.

Thanks for any testing/advice. We should probably update official
instructions on the main website if we agree on what they should be.

Anna

>
> Hope this helps,
>
> Cheers,
>
> Rainer
>
>
> Anna
>
>
> BTW, in the homebrew formula for grass7 [1] I see:
>
> stable do
>    url "https://grass.osgeo.org/grass72/source/grass-7.2.0.tar.gz"
>
> i.e. 7.2.0, instead of 7.2.1.
>
> Maybe we should create a symbolic link
>
>
> https://grass.osgeo.org/grass72/source/current_stable.tar.gz ->
> https://grass.osgeo.org/grass72/source/grass-7.2.1.tar.gz
>
> ?
>
> Or even
>
> https://grass.osgeo.org/current_stable.tar.gz ->
> https://grass.osgeo.org/grass72/source/grass-7.2.1.tar.gz
>
> to make it easier for build scripts such as these to always point to the
> latest stable version ?
>
>
> Moritz
>
> [1]
> https://github.com/OSGeo/homebrew-osgeo4mac/blob/master/Formula/grass7.rb
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev
>
>


More information about the grass-dev mailing list