r-spatial / RQGIS3

GNU Lesser General Public License v3.0
69 stars 19 forks source link

make RQGIS3 work on Mac OS #3

Closed jannes-m closed 4 years ago

pat-s commented 5 years ago

I do not know when I will have time to dig deeper into the crashing issue when initializing open_app(). If you want to have my VM to try it for yourself, just tell me so.

jannes-m commented 5 years ago

@pat-s have you tried to run RQGIS3 outside of RStudio, i.e., by starting R from the terminal? In fact, RQGIS3 works on Arch and on Ubuntu when starting R from the terminal (see also here). Doing the same from within RStudio crashes the R session when running open_app(). Not sure what we can do about that (maybe ask RStudio for support?). Even stranger, running RQGIS3 from within RStudio in a docker container works (see docker-rqgis).

pat-s commented 5 years ago

AFAIR yes. The crashing issue sounds weird, definitely something we should report to the RStudio guys. I'll give you my VM next week so you can play around for yourself if you have some time :)

alazarolop commented 5 years ago

Hi, I've tried the package and I wanted to help adding some details to the issue. Thank you for the effort to develop it.

I've installed "mac" branch of the project and it can reproduce the same situation as commented: running open_app() crashes R session within RStudio, but it works in R from the terminal with some caveats.

It asks for Python 3.6 and gives some warning messages when used with Python 3.7 (it's installed along with qgis-ltr from Homebrew):

/usr/local/Cellar/qgis-ltr/3.4.5/QGIS.app/Contents/Resources/python/qgis/utils.py:672: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  mod = _builtin_import(name, globals, locals, fromlist, level)
/usr/local/Cellar/qgis-ltr/3.4.5/QGIS.app/Contents/Resources/python/qgis/utils.py:672: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  mod = _builtin_import(name, globals, locals, fromlist, level)
/usr/local/Cellar/qgis-ltr/3.4.5/QGIS.app/Contents/Resources/python/yaml/constructor.py:126: DeprecationWarning:

Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working

Besides, when I run find_algorithms(search_term = "slope", name_only = TRUE), it gives processes from GDAL, GRASS 7 and QGIS, but it won't find from SAGA nor TauDEM even thought I can get them when I use the search tool within QGIS 3. Not sure whether this is the right behaviour.

And when I want to finish the session after the test I get this message too:

*** caught segfault ***
address 0x0, cause 'unknown'

Thank you in advance and I hope it could help.

jannes-m commented 5 years ago

Thanks @alazarolop, your comments are very much appreciated! Unfortunately, I have no clue about MacOS. @pat-s always took care of the Mac-stuff but atm he is taking a break from the RQGIS3 development but I hope that comments such as yours will encourage him to take a look at RQGIS3 soon again. In any case, it seems you experience the RStudio R session crash as we also do in the case of Linux. Interestingly, RStudio doesn't crash under Windows... And afaik, TauDEM was removed from the processing toolbox (see here), and since RQGIS3 only support the processing toolbox, you won't find the TauDEM geoalgorithms any longer. OTH SAGA should work, and does under Linux and Windows.

alazarolop commented 5 years ago

Good! So I'll also keep an eye on the Linux solution, I usually work with Ubuntu too.

About TauDEM, I didn't know about it cause I can see it in the Processing toolbox and it's marked as a core plugin when I build QGIS 3 on the Mac. It's good to know it. Thank you for your concern.