2

I can install QGIS3.X but cannot run a GRASS process. I get the popup:

This algorithm cannot be run :-( GRASS 7 can't be found on this system from a shell. Please install it or configure your PATH environment variable.

I have been putting repos from the following into my source.list https://qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu and after apt-get update and apt-get upgrade, using the following command to install

sudo apt-get install qgis python3-qgis qgis-plugin-grass

NB: I did have a previous (working) QGIS installation (2.18 in Ubuntu 16.04) that had I upgraded to 3.6 (after upgrading to 18.04) using the https://qgis.org/debian repo which I tried removing in order to reinstall using

sudo apt-get remove -y qgis python-qgis qgis-plugin-grass grass-gui grass grass-dev
    sudo apt-get purge qgis python-qgis qgis-plugin-grass grass-gui grass grass-dev
sudo apt-get autoremove

setting the repo in my sources.list file (to one from the link above) and updating.

I still get the popup.

After every attempt I also tried to run GRASS (or grass74) from the console and each time receive:

File "/usr/bin/grass", line 1673
sys.stdout.write("%s\n" % grass_version)
                                       ^
TabError: inconsistent use of tabs and spaces in indentation

(or similar for grass74) I don't normally run GRASS from the command line so I don't know if this is what I should expect. (I guess not, but can't tell, and can't find an example online of what I should find, or means to solve this).

At this point I'm stumped as to the problem or pathway to solution barring reinstalling 18.04 from scratch (not preferred).

Here are some of the things I've thought of but can't answer:

Is my purge process incomplete? What else could I check or do here?

Do none of the repos currently provide a version of qgis and grass that work together? Is there an alternative working repo?

Do people need to manually locate grass and input the location info into their system path or some parameter setting in qgis as suggested in some outdated stack-exchange queries? If so how?/where?

3
  • This was fixed in Dec 2018: github.com/OSGeo/grass/commit/… and is part of GRASS GIS 7.4.4 or later. Do you still use GRASS GIS 7.4.3?
    – markusN
    Jun 13, 2019 at 19:40
  • After trying a selection of repos from the qgis installation page. I have ultimately used the LTR version (as per the qgis installation page) with deb http://qgis.org/ubuntu-ltr bionic main deb-src http://qgis.org/ubuntu-ltr bionic main in my sources.list. This has resulted in an installation of grass 7.4.0. Which I fixed as per my answer. I 'could' drop in to a different repo and see what happens to the grass version no. but I'm not prepared to bork a (now) working installation. Thanks. Hopefully this question and answer will help anyone else installing the current LTS qgis for 18.04
    – Mr Purple
    Jun 16, 2019 at 3:53
  • Just FYI - here is the version overview: packages.ubuntu.com/search?keywords=grass
    – markusN
    Jun 16, 2019 at 9:57

1 Answer 1

0

No need to reinstall anything. As per:

https://stackoverflow.com/questions/53544255/i-am-trying-to-run-the-r-reclass-on-qgis-and-keep-getting-an-indentation-error

I just edited the /usr/bin/grass file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.