Basic Installation Guide
Installation Instructions¶
We recommend that you use Windows 10, Windows 11, or Ubuntu Linux. Mac users, please see Mac install guide
In order to use Coastseg you need to install Python packages in an environment. We recommend you use Miniforge to install the python packages in an environment for Coastseg.
After you install Anaconda/miniforge on your PC (see our How to Install Miniforge), open the Anaconda Prompt/Miniforge Prompt in Windows or Terminal in Mac and Linux. Then use the cd
command (change directory) to go the folder where you have downloaded the Coastseg repository.
We highly recommend you install CoastSeg using conda
following the instructions in Install from conda-forge.
Step 1: Install CoastSeg from Github¶
- Make sure you have git installed and if not please download it here
- This install
git
as well asgit bash
on your computer
- This install
-
Open a terminal (or if you are on windows open
git bash
) and run the command1
git --version
- It should return something like this if you have it git installed
1 2
git --version git version 2.47.0.windows.1
-
Open a terminal that has git installed, then use the
cd
command (c
hanged
irectory) to switch the location you want to install CoastSeg - Then use the
git clone https://github.com/SatelliteShorelines/CoastSeg.git --depth 1
to install the code from github - Once the git clone command finishes use the
cd
command (c
hanged
irectory) to switch the CoastSeg directory containing the code you installed.
1 2 3 |
|
Method #1: Install from conda-forge (Recommended)¶
0. Install MiniForge/Anaconda
To get started, you'll need to install MiniForge, which is a free and open-source distribution of Python and R that comes with essential packages and tools for scientific computing and data science.
Follow our guide here: How to Install Miniforge
Note: CoastSeg will work in Anaconda, however since not all users can use Anaconda due to the EULA we provide only provide installation instructions for Miniforge.
1.Create an Conda Environment and Activate it
- This command creates an anaconda environment named
coastseg
and installspython 3.10
in it.
1 2 |
|
2.Install coastseg
1 |
|
3.(Optional) Install Optional Dependencies
- Only install these dependencies if you plan to use CoastSeg's Zoo workflow notebook.
- Warning installing tensorflow will not work correctly on Mac see for more details Mac install guide
1 2 3 |
|
Method #2: Install from Pypi¶
1.Create an miniconda/Anaconda environment
- This command creates an anaconda environment named
coastseg
and installspython 3.10
in it.1
conda create --name coastseg python=3.10 -y
2.Activate your conda environment
1 |
|
- If you have successfully activated coastseg you should see that your terminal's command line prompt should now start with
(coastseg)
.
3.Install the CoastSeg from PyPi
1 |
|
4.Install GDAL from conda-forge
- CoastSeg requires
gdal
to function properly and requires it to be installed fromconda-forge
due to how it is configured in the conda environment. - Make sure to install
gdal
from theconda-forge
channel to ensure you get the latest version and to avoid dependency conflicts.
1 |
|
5.(Optional) Install Optional Dependencies for the Zoo Workflow
- Only install these dependencies if you plan to use CoastSeg's Zoo workflow notebook.
- Warning installing tensorflow will not work correctly on Mac see for more details Mac install guide
1 2 3 |
|
- If you get any errors about numpy try running
pip install numpy<2
Having Installation Errors?¶
Use the command conda clean --all
to clean old packages from your anaconda base environment. Ensure you are not in your coastseg environment or any other environment by running conda deactivate
, to deactivate any environment you're in before running conda clean --all
. It is recommended that you have Anaconda prompt (terminal for Mac and Linux) open as an administrator before you attempt to install coastseg
again.