Your error messages (for reference)
Error message 1
Traceback (most recent call last):
File “/Users/Man/Pylith/pylith-2.2.2-darwin-10.13.6/bin/pylith”, line 25, in
from pylith.apps.PyLithApp import PyLithApp
ImportError: No module named pylith.apps.PyLithApp
Error message 2
“Traceback (most recent call last):
File “/Users/XIE/Pylith/bin/Pylith”, line 25, in from pylith.apps.PyLithApp import PyLithApp ImportError: No module named pylith.apps.PyLithApp”
Comments on your error messages
The two error messages you showed are similar but there are important differences. The first one is clearly using the PyLith binary in /Users/Man/PyLith/pylith-2.2.2-darwin-10.13.6
. The second message is NOT using any PyLith install procedure we have created. It is using PyLith
, but all of our methods for installing PyLith create a file pylith
(all lower case). PyLith
is in /Users/XIE/Pylith/bin/
, so you definitely did something completely different (different user and different directory structure).
To help us help you, please follow these instructions precisely:
If you see output different than what I have shown here (except for the start of the absolute path), please post the commands you ran and all of the output for ALL of the steps up to that point (not just the one that is different). Addendum: Please also include the output of echo $PATH
and echo $PYTHONPATH
run in the bash shell after you do source setup.sh
.
- Go to the top-level PyLith directory,
pylith-2.2.2-darwin-10.13.6
. Typing ls
at the bash prompt should give you
bin/ include/ lib/ parametersgui/ setup.sh share/ src/
- Type
source setup.sh
at the bash prompt. You should see
Ready to run PyLith.
Note: You must run source setup.sh
in any new bash shell before running PyLith. That is, if you close your terminal and start a new one, you must run source setup.sh
again.
- Type
which pylith
at the bash prompt. You should see something very similar to
/Users/baagaard/tmp/pylith/pylith-2.2.2-darwin-10.13.6/bin/pylith
- Type
which nemesis
at the bash prompt. You should see nemesis
in the same directory as the pylith
in step 3:
/Users/baagaard/tmp/pylith/pylith-2.2.2-darwin-10.13.6/bin/nemesis
- Type
nemesis
at the bash prompt and then (at the Python prompt) type import pylith.apps.PyLithApp
, then pylith.apps.PyLithApp.__file__
, then app = pylith.apps.PyLithApp.PyLithApp()
. You should see
Python 2.7.16 (default, Dec 3 2019, 07:02:07)
[GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.37.14)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pylith.apps.PyLithApp
>>> pylith.apps.PyLithApp.__file__
'/Users/baagaard/tmp/pylith/pylith-2.2.2-darwin-10.13.6/lib/python2.7/site-packages/pylith/apps/PyLithApp.pyc'
>>> app = pylith.apps.PyLithApp.PyLithApp()
- Type
pylith --version
. You should see something very similar to the following
Platform:
Hostname: igskcicgltgm067
Operating system: Darwin
Kernel: 18.7.0
Version: Darwin Kernel Version 18.7.0: Thu Jan 23 06:52:12 PST 2020; root:xnu-4903.278.25~1/RELEASE_X86_64
Machine: x86_64
Processor: i386
PyLith
Release v2.2.2
PETSc
Release v3.10.2
Spatialdata
Release v1.10.0
MPI standard: 3.1, implementation: MPICH, version: 3.2.1
HDF5 version: 1.10.5
NetCDF version: 4.6.3
Proj version: 501
Python
v2.7.16 of CPython compiled with GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.37.14)
FIAT: v0.9.9 from /Users/baagaard/tmp/pylith/pylith-2.2.2-darwin-10.13.6/lib/python2.7/site-packages/FIAT
spatialdata: v1.10.0 from /Users/baagaard/tmp/pylith/pylith-2.2.2-darwin-10.13.6/lib/python2.7/site-packages/spatialdata
netCDF4: v1.5.0.1 from /Users/baagaard/tmp/pylith/pylith-2.2.2-darwin-10.13.6/lib/python2.7/site-packages/netCDF4-1.5.0.1-py2.7-macosx-10.13-intel.egg/netCDF4
h5py: v2.9.0 from /Users/baagaard/tmp/pylith/pylith-2.2.2-darwin-10.13.6/lib/python2.7/site-packages/h5py-2.9.0-py2.7-macosx-10.13-intel.egg/h5py
pyre: v0.8.1 from /Users/baagaard/tmp/pylith/pylith-2.2.2-darwin-10.13.6/lib/python2.7/site-packages/pythia-0.8.1.19-py2.7.egg/pyre
numpy: v1.14.3 from /Users/baagaard/tmp/pylith/pylith-2.2.2-darwin-10.13.6/lib/python2.7/site-packages/numpy-1.14.3-py2.7-macosx-10.13-intel.egg/numpy
If you publish results based on computations with PyLith please cite the following:
(use --include-citations during your simulations to display a list specific to your computation):
@Manual{PyLith:software,
title = {PyLith v2.2.2},
author = {Aagaard, B. and Knepley, M. and Williams, C.},
organization = {Computational Infrastructure for Geodynamics (CIG)},
address = {University of California, Davis},
year = {2017},
doi = {http://doi.org/10.5281/zenodo.886600}
}
@Manual{PyLith:manual,
title = {PyLith User Manual, Version 2.2.2},
author = {Aagaard, B. and Knepley, M. and Williams, C.},
organization = {Computational Infrastructure for Geodynamics (CIG)},
address = {University of California, Davis},
year = {2017},
note = {http://www.geodynamics.org/cig/software/pylith/pylith\_manual-2.2.2.pdf}
}
@Article{Aagaard:Knepley:Williams:JGR:2013,
author = {Aagaard, B.~T. and Knepley, M.~G. and Wiliams, C.~A.},
title = {A domain decomposition approach to implementing fault slip in finite-element models of quasi-static and dynamic crustal deformation},
journal = {Journal of Geophysical Research Solid Earth},
year = {2013},
volume = {118},
pages = {3059--3079},
doi = {10.1002/jgrb.50217}
}