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 Anaconda or Miniconda to install the python packages in an environment for Coastseg.
After you install miniconda/Anaconda on your PC, open the Anaconda prompt or Terminal in Mac and Linux and 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
- It should return something like this if you have it git installed
- 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 Anaconda
To get started, you'll need to install Anaconda, 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. Here’s how you can install it:
-
Install Anaconda by following the instructions at Anaconda install page
-
Verify the installation
- Once the installation is complete, open your terminal (or Anaconda Prompt on Windows).
- Type the following command to check if Anaconda is installed correctly:
1 |
|
1.Create an miniconda/Anaconda 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.11 -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 Conda Dependencies
- CoastSeg requires
geopandas
to function properly so they will be installed in thecoastseg
environment. - Geopandas has GDAL as a dependency so its best to install it with conda.
- Make sure to install geopandas from the
conda-forge
channel to ensure you get the latest version and to avoid dependency conflicts
1 |
|
4.Install the CoastSeg from PyPi
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.