I can't get GRASS to work on my system, and after doing some digging I think it is related to me using 64-bit python. I'm not really sure. I get this message...

        This module requires the Numeric/numarray or NumPy module,
        which could not be imported.  It probably is not installed
        (it's not part of the standard Python distribution). See the
        Numeric Python site (http://numpy.scipy.org) for information on
        downloading source or binaries.

when I try to import numpy from the GRASS shell I get:

ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
packages/numpy/core/multiarray.so, 2): no suitable image found.  Did find:
packages/numpy/core/multiarray.so: mach-o, but wrong architecture

I am using GRASS 7.0.0. I installed all of the required frameworks without a problem. I currently have python27-apple selected, but I have other versions on python from macports. Numpy imports fine into any version of python I select, but not into GRASS. Can anybody help?

  • Are you sure the version of Numpy you have is the one required by GRASS? – camdenl Mar 10 '15 at 16:53
  • Good point! While I did install numpy from grassmac.wikidot.com/frameworks, the versions I was previously running were 1.9.1_2 (installed via macports). I wonder if somehow my macports numpy installs are overriding the binary installation. – user14241 Mar 10 '15 at 17:22
  • I don't really have time to deal with this issue anymore. The macports installation worked and so I'm just using that. Hopefully they get GRASS 7.x soon. – user14241 Mar 11 '15 at 13:46

You need to install the required frameworks first. The Numpy framework you can download where you (likely) also downloaded GRASS GIS 7.0.0 for Mac OSX, see:


  • As I mentioned, I already installed all of the required frameworks. I did get a successful build started on macports. At first it wouldn't build, but I received a message about gdal and architecture. My macports gdal install had the +mrsid variant and I think this was causing issues somehow. Uninstalling and cleaning gdal seems to have done the trick, but I had to leave for work before I could see if it finished. I wonder if the unsuccessful binary installation was somehow related to this, even though I installed the gdal framework from the site you link. – user14241 Mar 10 '15 at 13:36
  • The best is to contact the packager about this issue (see the indicated Web page). – markusN Mar 11 '15 at 10:06

Not directly related to the question, but since I landed here I'm guessing others might as well.

I was also having problems with numpy on Ubuntu 14.04 (when using GRASS 7.0.0). The issue in my case was the numpy version, which was 1.9 whereas the subpackage numpy.oldnumeric (needed by GRASS) is only shipped with numpy until version 1.8. The solution was simply to install numpy 1.8... ("sudo pip install "numpy<1.9")

For more advanced tricks when keeping 1.9 is important, see: https://github.com/spectralpython/spectral/issues/13

(I am aware this has little to do with system architecture...)

  • In OSGeo4W installer, upgrading python-numpy to 1.11.0-1 caused this error in GRASS 7.0.4 for me. Backing python-numpy to 2.7-1.7.0-1 solved the Problem. – MonsterMushroom Jul 14 '16 at 12:28

After installing the modules you need to manually update the bash_profice as homebrew installs everything under /usr/local, and this needs to be in your PATH. Add in the following order:

export GRASS_PYTHON=/System/Library/Frameworks/Python.framework/Versions/Current/bin/pythonw
export PATH=/usr/local/bin:$PATH

If you want to use homebrew’s python inside GRASS call /usr/local/bin/python from GRASS’ terminal. This worked on mac OS 10.11.6 with GrassGis 7.3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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