Prerequisites: Before installing, check that you have the Installation Prerequisites.
Install using pip¶
This is the simplest approach, particularly if you already use pip for other purposes; see Installation instructions (pip).
Unfortunately if this doesn’t work it may be hard to debug what went wrong.
Install from a tarfile¶
Download a tar file of the latest release:
- Previous versions of Clawpack
- Recent changes — release notes
See Clawpack components for a list of what’s included in this tar file.
Save this tar file in the directory where you want the top level of the clawpack tree to reside. Then untar using the command:
tar -xzvf clawpack-v5.4.0.tar.gz
Then move into the top level directory:
Next install the Python components of Clawpack:
python setup.py install
This will compile a lot of Fortran code using f2py and will produce a lot of output, so you might want to redirect the output, e.g.
python setup.py install > install_output.txt
If you get compilation errors in this step, you can still use the Classic, AMRClaw, and GeoClaw; see Install other packages without compiling PyClaw.
Install other packages without compiling PyClaw¶
If you get errors in the compilation step when using pip install or python setup.py install, check Troubleshooting Installation. If your problem is not addressed there, please let us know or raise an issue. You can still use the Fortran codes (AMRClaw, GeoClaw, and Classic) by doing the following.
First, download a tarfile of the latest release as described in install_clawpack.
Next Set environment variables. You must then also set your PYTHONPATH manually:
Then you should be able to do:
cd $CLAW # assuming this environment variable was properly set python setup.py symlink-only
This will create some symbolic links in the $CLAW/clawpack subdirectory of your top level Clawpack directory, but does not compile code or put anything in your site-packages. In Python you should now be able to do the following, for example:
>>> from clawpack import visclaw
If not then either your $PYTHONPATH environment variable is not set properly or the required symbolic links were not created. See Set environment variables for more information, and Python path if you are having problems with importing Python modules.
Next go to Running an example.
Install only PyClaw (for running in parallel)¶
First, install PyClaw as explained above. Then see the install instructions for Running in parallel.
Alternatively, you may use the following shell scripts (assembled by Damian San Roman) to install everything:
Install the latest development version¶
The development version of Clawpack can be obtained by cloning https://github.com/clawpack. This is advised for those who want to help develop Clawpack or to have the most recent bleeding edge version. See Installation instructions for developers for instructions.
Running Clawpack on a VM or in the Cloud¶
The information on the pages listed below is out of date.
Virtual Machine. An alternative to installing the install_prerequisites and Clawpack itself is to use the Clawpack Virtual Machine.
Once Clawpack is installed, you can go to one of the following pages to get started: