Installing pwfdf-api¶
Note
These instructions for pwfdf-api users. If you plan to develop the package, you should do a developer installation instead.
Prerequisites¶
Python¶
The pwfdf-api requires Python 3.11+.
Virtual Environment¶
We recommend installing pwfdf-api in a clean virtual environment. This is because other geospatial software can sometimes interfere with the package’s backend. There are many tools for managing virtual environments including miniforge, conda, venv, and virtualenv. If you are not familiar with virtual environments, then miniforge may be a good starting point.
For example, after installing miniforge, you can create a new python environment using:
conda create -n pwfdf-api python --yes
and then activate the environment with:
conda activate pwfdf-api
Pip Install¶
You can install the latest full-feature release using:
pip install pwfdf-api[gis] -i https://code.usgs.gov/api/v4/groups/859/-/packages/pypi/simple
The URL in this command instructs pip to install pwfdf-api from the official USGS package registry. This ensures that you are installing an official USGS product, and not a similarly named package from a third party. The 859 in the URL is the code for packages released by the Landslide Hazards Program.
Note
This default method installs pwfdf-api along with several optional geospatial libraries. If you want to install pwfdf-api without these optional libraries, then refer to the slim installation instead.