Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mac-and-windows-install-docs #1586

Merged
merged 6 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Table of Contents for Contibution
1. [Overview of Contribution](#overview)
2. [Installing PlantCV for Contributors](#installing)
2. [Creating Issues](#creatingissues)
3. [Contributing Text or Code](#textcode)
* [Set-Up Development Environment](#devenvironmment)
Expand Down Expand Up @@ -35,6 +36,32 @@ There are many ways to contribute:

If you need any help, please contact us.

## Installing PlantCV for contributors <a name="installing"></a>
Before getting started, please read our [contributor guidelines](CONTRIBUTING.md) and [code of conduct](CODE_OF_CONDUCT.md).

You can build PlantCV from the source code if you are a developer or want the absolute latest version available.
As noted in the [installation documentation](installation.md), we recommend installing PlantCV in a virtual environment. We will outline how to do this using `conda`.
You will also need a [GitHub](https://github.com) account. You will need to
[clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) the PlantCV
repository from GitHub before getting started.

To set up your environment, follow these steps in your command-line terminal:

```bash
# Enter the PlantCV directory
cd plantcv

# Create a conda environment named "plantcv" (or whatever you like) and automatically install the developer dependencies
conda env create -n plantcv -f environment.yml

# Activate the plantcv environment (you will have to do this each time you start a new session)
conda activate plantcv

# Install PlantCV in editable mode so that it updates as you work on new features/updates
pip install -e .

```

## Creating Issues <a name="creatingissues"></a>

- Make sure you have a GitHub account.
Expand Down
66 changes: 34 additions & 32 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,36 @@
## Installation
## Installing PlantCV

!!!note
This guide describes typical installations of PlantCV.
PlantCV can be installed from source for developers or users who want to test the latest features.
Please see our [Contributing Guide](#CONTRIBUTING.md) for more information.

### Table of contents
1. [Supported platforms and dependencies](#dependencies)
2. [Install via a package manager](#install)
2. [Desktop installation step-by-step guide](#desktop)
3. [Server/command-line step-by-step guide](#cli)
4. [Detailed installation instructions](#detailed)
1. [Conda](#conda)
2. [PyPI](#pypi)
3. [Installing PlantCV for contributors](#contributors)

### Supported platforms and dependencies <a name="dependencies"></a>
- Linux 64-bit, x86 processors
- macOS x86 (Intel) and M (ARM) processors
- Windows 64-bit, x86 processors

### Desktop installation step-by-step guide <a name="desktop"></a>

<iframe src="https://scribehow.com/embed/Install_PlantCV_via_Jupyter_Lab_Desktop__cS9d6VcxRcuDPGZxDfQycw" width="100%" height="640" allowfullscreen frameborder="0"></iframe>

### Server/command-line step-by-step guide <a name="cli"></a>

<iframe src="https://scribehow.com/embed/Installing_PlantCV__MacOSLinux__awAP9Xm2SgWV4SMZadm9CQ" width="640" height="640" allowfullscreen frameborder="0"></iframe>

### Detailed installation instructions <a name="detailed"></a>

PlantCV requires Python (tested with versions 3.9, 3.10, and 3.11) and these [Python packages](https://github.com/danforthcenter/plantcv/blob/main/pyproject.toml).
Additionally, we recommend installing [JupyterLab](https://jupyter.org/).

### Install via a package manager <a name="install"></a>

!!!note
We recommend installing PlantCV in a virtual environment, which is a self-contained Python environment that includes
PlantCV and its dependencies. Virtual environments are used to avoid conflicts between packages and can increase the
Expand All @@ -25,10 +39,23 @@ Additionally, we recommend installing [JupyterLab](https://jupyter.org/).
Stable releases of PlantCV are available through both the [Python Package Index (PyPI)](https://pypi.org/) and
`conda` through the [conda-forge channel](https://conda-forge.org/).

#### Conda <a name="conda"></a>
#### Installing Conda <a name="conda"></a>
First install `conda` if you do not already have it. We recommend using the [Miniconda](https://conda.io/miniconda.html),
but the full [Anaconda](https://www.anaconda.com/download/) distribution will also work.

If you are new to conda environments, check out this [Getting Started with Conda Guide](https://conda.io/projects/conda/en/latest/user-guide/getting-started.html).

!!! note
Additional instructions for Windows users:

Windows users will need to install a Linux terminal to install and use PlantCV. We recommend using Anaconda Prompt which comes with Anaconda and Miniconda.

Alternatively, Windows users can download [Git for Windows](https://gitforwindows.org/). This option requires users to add conda to their `.bashrc` file. See this helpful [guide](https://discuss.codecademy.com/t/setting-up-conda-in-git-bash/534473) for setting up conda in Git Bash.

#### Installing PlantCV with conda

Open Terminal (Mac) or Anaconda Prompt (Windows) and run the following:

```bash
conda create -n plantcv -c conda-forge plantcv

Expand All @@ -42,6 +69,7 @@ conda create -n plantcv -c conda-forge plantcv jupyterlab ipympl nodejs
```

#### PyPI <a name="pypi"></a>
Optionally, PlantCV can be installed from PyPi.

```bash
pip install plantcv
Expand All @@ -54,29 +82,3 @@ Or with optional (but recommended) dependencies:
pip install plantcv jupyterlab ipympl

```

### Installing PlantCV for contributors <a name="contributors"></a>
Before getting started, please read our [contributor guidelines](CONTRIBUTING.md) and [code of conduct](CODE_OF_CONDUCT.md).

You can build PlantCV from the source code if you are a developer or want the absolute latest version available.
As noted above, we recommend installing PlantCV in a virtual environment. We will outline how to do this using `conda`.
You will also need a [GitHub](https://github.com) account. You will need to
[clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) the PlantCV
repository from GitHub before getting started.

To set up your environment, follow these steps in your command-line terminal:

```bash
# Enter the PlantCV directory
cd plantcv

# Create a conda environment named "plantcv" (or whatever you like) and automatically install the developer dependencies
conda env create -n plantcv -f environment.yml

# Activate the plantcv environment (you will have to do this each time you start a new session)
conda activate plantcv

# Install PlantCV in editable mode so that it updates as you work on new features/updates
pip install -e .

```