Anyone having installation errors like this? Version 3.1, Mac OS Sierra

1,015 views
Skip to first unread message

ghentr

unread,
Jul 31, 2017, 3:45:34 PM7/31/17
to gprMax-users
I have a problem that manifests itself two ways: 
   1) After installing, when I try to run a model, I get this message:
from terminaltables import AsciiTable
ImportError: No module named 'terminaltables'

2) Trying to trace this to its source, it seems like it might be a problem with the required gcc installation, which is also throwing errors (discovered upon deleting gprMax and attempting to reinstall it);  conda env create -f conda_env.yml eventually yields:

 Failed building wheel for mpi4py
  Running setup.py clean for mpi4py
Failed to build mpi4py
Installing collected packages: mpi4py, terminaltables, tqdm
  Running setup.py install for mpi4py ... error
    Complete output from command /anaconda/envs/gprMax/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/y9/jpm29xkx63g31pnzv1h196w00000gn/T/pip-build-lwm1jt3j/mpi4py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/y9/jpm29xkx63g31pnzv1h196w00000gn/T/pip-5i5peq2r-record/install-record.txt --single-version-externally-managed --compile:
.....
    MPI configuration: [mpi] from 'mpi.cfg'
    checking for library 'lmpe' ...
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda/envs/gprMax/include -arch x86_64 -c _configtest.c -o _configtest.o
    gcc -flat_namespace -undefined suppress -arch x86_64 _configtest.o -llmpe -o _configtest
    ld: library not found for -llmpe
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    failure.
  ....
(and a bunch more manifestations of this same thing)
....
 gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda/envs/gprMax/include -arch x86_64 -I/anaconda/envs/gprMax/include/python3.5m -c _configtest.c -o _configtest.o
    _configtest.c:2:10: fatal error: 'mpi.h' file not found
    #include <mpi.h>
             ^
    1 error generated.
    failure.
    removing: _configtest.c _configtest.o
    error: Cannot compile MPI programs. Check your configuration!!!
    
    ----------------------------------------
Command "/anaconda/envs/gprMax/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/y9/jpm29xkx63g31pnzv1h196w00000gn/T/pip-build-lwm1jt3j/mpi4py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/y9/jpm29xkx63g31pnzv1h196w00000gn/T/pip-5i5peq2r-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/y9/jpm29xkx63g31pnzv1h196w00000gn/T/pip-build-lwm1jt3j/mpi4py/

CondaValueError: pip returned an error.

Any takers?

Thanks.


Craig Warren

unread,
Aug 1, 2017, 4:41:55 AM8/1/17
to gprMax-users
Hi ghentr,

Welcome to the forum!

The problem you are experiencing is because the Python package mpi4py is not being installed properly, and because of that the subsequent packages terminaltables and tqdm never get installed. This all happens as part of creating the conda environment. mpi4py depends on having an underlying MPI installation - usually OpenMPI - and I suspect you don't have this which is why it is failing. You can install OpenMPI with homebrew -
brew install openmpi
then try creating the condo environment again
conda env create -f conda_env.yml

Alternatively if you don't think you'll ever use the MPI functionality (see User Guide - http://docs.gprmax.com/en/latest/openmp_mpi.html#mpi) you can edit the condo_env.yml file and remove the mpi4py line.

Kind regards,

Craig

ghentr

unread,
Aug 1, 2017, 8:59:25 AM8/1/17
to gprMax-users
Thanks, Craig; problem solved!
Reply all
Reply to author
Forward
0 new messages