I attempted to install GRASS GIS 7 on ubuntu 14.04 using these instructions.

When I call grass70 from the command line I get a welcome message and a prompt to continue. I then get two error messages:

Traceback (most recent call last):
  File "/usr/lib/grass70/gui/wxpython/gis_set.py", line 31, in <module>
    from core import globalvar
  File "/usr/lib/grass70/gui/wxpython/core/globalvar.py", line 29, in <module>
    from core.debug import Debug
  File "/usr/lib/grass70/gui/wxpython/core/debug.py", line 25, in <module>
    import grass.script as grass
  File "/usr/lib/grass70/etc/python/grass/script/__init__.py", line 5, in <module>
    from db     import *
ImportError: No module named 'db'

which says there is an error in the GUI startup, switching to text-mode and then

File "/usr/lib/grass70/bin/grass70", line 251
    os.mkdir(tmpdir, 0700)
SyntaxError: invalid token

which leaves me back in the bash shell.

Does anybody have some advice on what could be going wrong and how it could be fixed?

UPDATE: I installed the Grass7 stable version that has just been released using the following:

sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo add-apt-repository ppa:grass/grass-stable
sudo apt-get update
sudo apt-get install grass7

I still get the ImportError: No module named 'db'.

There is a module called db.py in the path /usr/lib/grass70/etc/python/grass/script/.

/usr/bin/python --version outputs Python 2.7.8 but python --version outputs Python 3.4.2 :: Anaconda 2.1.0 (64-bit).

  • Why not just use a package? Your errors are odd, are they really the first ones that occur? Feb 10, 2015 at 10:21
  • My first attempt was installing the package from the repositories as suggested on the Grass GIS website. What are so odd about the errors, could you elaborate? Feb 10, 2015 at 10:27
  • And what went wrong? Custom builds always require more effort. The errors are odd due to their content and place. The first one is ok, but the second one just makes me think something is wrong with the file or wrong version or python is used or both. Feb 10, 2015 at 10:38
  • I wish I remembered what went wrong with the original effort. It would have been better not to try and do the custom install. Feb 10, 2015 at 10:44
  • The GRASS GIS 7 package on Ubuntu is currently being polished, let's hope that the remaining packaging issues are sorted out soon.
    – markusN
    Feb 12, 2015 at 18:27

1 Answer 1


Thanks to some discussion in the comments I was able to get solve this problem.

I had previously installed Python 3.4 Using Anaconda. During the anaconda installation process it asked to add export PATH=$HOME/anaconda/bin:$PATH to .bashrc. By removing this line in the .bashrc file I can get Grass 7 to start up.

EDIT: Although I get it to start it still runs with some errors.

Your Answer

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

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