| ... | ... | @@ -23,13 +23,13 @@ open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10 |
|
|
|
|
|
|
|
and performing that install before running the install.sh script.
|
|
|
|
|
|
|
|
**Catalina (10.15.x)** and **Big Sur (11.x)**: The steps for 10.14.x, above, will not work. You will need to execute:
|
|
|
|
**Catalina (10.15.x)**, **Big Sur (11.x)**, and **Monterey (12.x)**: The steps for 10.14.x, above, will not work. You will need to execute:
|
|
|
|
|
|
|
|
```
|
|
|
|
export CPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
|
|
|
|
```
|
|
|
|
|
|
|
|
before running install.sh.
|
|
|
|
before running install.sh. (But first install Xcode and the xcode developer's tools as discussed above.)
|
|
|
|
|
|
|
|
# Instructions
|
|
|
|
If you are already using conda virtual environments, deactivate before proceeding
|
| ... | ... | @@ -38,7 +38,7 @@ If you are already using conda virtual environments, deactivate before proceedin |
|
|
|
```
|
|
|
|
And clone this repository
|
|
|
|
```
|
|
|
|
> git clone https://github.com/usgs/shakemap.git --branch 4.0.4 shakemap_src
|
|
|
|
> git clone https://github.com/usgs/shakemap.git shakemap_src
|
|
|
|
```
|
|
|
|
|
|
|
|
Run the install script in the cloned repository
|
| ... | ... | @@ -48,51 +48,12 @@ Run the install script in the cloned repository |
|
|
|
```
|
|
|
|
If no version of `conda` is detected, it will install [miniconda](https://conda.io/miniconda.html), which we use for managing dependencies and creating a virtual environment for running ShakeMap.
|
|
|
|
|
|
|
|
To install with developer tools included, run the same install script but with the "-d" switch:
|
|
|
|
```
|
|
|
|
> bash install.sh -d
|
|
|
|
```
|
|
|
|
This will install these additional packages:
|
|
|
|
- ipython
|
|
|
|
- autopep8
|
|
|
|
- flake8
|
|
|
|
- pyflakes
|
|
|
|
- rope
|
|
|
|
- yapf
|
|
|
|
- sphinx
|
|
|
|
- sphinx-argparse
|
|
|
|
|
|
|
|
|
|
|
|
**If you do not have conda already installed and experience a significant delay during the "solving environment" step:** Install [mamba](https://mamba.readthedocs.io/en/latest/getting_started.html#for-new-users), a conda alternative, prior to shakemap install.
|
|
|
|
|
|
|
|
If the script finishes without errors, then the final two lines of output will be
|
|
|
|
```
|
|
|
|
Successfully installed shakemap
|
|
|
|
Type 'conda activate shakemap' to use this new virtual environment.
|
|
|
|
```
|
|
|
|
|
|
|
|
On some OSs, you may see errors that end with something like:
|
|
|
|
|
|
|
|
```
|
|
|
|
...
|
|
|
|
error: command 'clang' failed with exit status 1
|
|
|
|
----------------------------------------
|
|
|
|
ERROR: Command errored out with exit status 1: /home/shake_hi/miniconda/envs/shakemap/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/shake_hi/shakemap_src/setup.py'"'"'; __file__='"'"'/home/shake_hi/shakemap_src/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.
|
|
|
|
Failed to pip install this package. Exiting.
|
|
|
|
```
|
|
|
|
If you see that error, edit setup.py and change the line:
|
|
|
|
|
|
|
|
```
|
|
|
|
os.environ['CC'] = 'clang'
|
|
|
|
```
|
|
|
|
|
|
|
|
to:
|
|
|
|
|
|
|
|
```
|
|
|
|
os.environ['CC'] = 'gcc'
|
|
|
|
```
|
|
|
|
|
|
|
|
Then rerun install.sh.
|
|
|
|
|
|
|
|
If you didn't already have conda configured prior to running the install script, you may need to source the bash profile; on OSX:
|
|
|
|
```
|
| ... | ... | |
| ... | ... | |