Skip to content

Commit 7e64b94

Browse files
Merge pull request #298 from Dana-Farber-AIOS/surya-narayanan-safe-working-install
Update README.md
2 parents acaef6c + 2352127 commit 7e64b94

File tree

1 file changed

+29
-22
lines changed

1 file changed

+29
-22
lines changed

README.md

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,24 @@ Stable versions are available as tagged releases on GitHub, or as versioned rele
2424

2525
There are several ways to install `PathML`:
2626

27-
1. `pip install` from PyPI (**recommended for users**)
28-
2. Clone repo to local machine and install from source (recommended for developers/contributors)
27+
1. `pip install` from PyPI
28+
2. Clone repo to local machine and install from source
2929
3. Use the PathML Docker container
3030

31-
Options (1) and (2) require that you first install all external dependencies:
32-
* openslide
33-
* JDK 8
31+
Option (1) is recommended for most users. It will install the latest versions of most packages.
32+
Option (2) is a deterministic environment setup, meaning that all package versions are pinned and it will install the
33+
pinned version of a package even if it is not the newest. The automated testing suite is run in this environment. This
34+
is the suggested installation method for users wanting to interface with the Mesmer model for IF workflows, and for
35+
contributors/developers. Option (3) uses the same environment from (2), but in a Docker
36+
container.
37+
38+
Options (1) and (2) require that you first install all external dependencies (namelt, JDK-8 and system libraries used
39+
by OpenSlide and OpenCV):
40+
41+
* Install external dependencies (Linux) with [Apt](https://ubuntu.com/server/docs/package-management):
42+
````
43+
sudo apt-get update && sudo apt-get install openslide-tools g++ gcc libblas-dev liblapack-dev python3-opencv
44+
````
3445
3546
We recommend using conda for environment management.
3647
Download Miniconda [here](https://docs.conda.io/en/latest/miniconda.html)
@@ -39,27 +50,12 @@ Download Miniconda [here](https://docs.conda.io/en/latest/miniconda.html)
3950
4051
## Installation option 1: pip install
4152
42-
Create conda environment:
53+
Create conda environment with dependencies:
4354
````
44-
conda create --name pathml python=3.8
55+
conda create --name pathml python=3.8 numpy=1.19.5 openjdk==8.0.152 -c conda-forge
4556
conda activate pathml
4657
````
4758
48-
Install external dependencies (Linux) with [Apt](https://ubuntu.com/server/docs/package-management):
49-
````
50-
sudo apt-get install openslide-tools g++ gcc libblas-dev liblapack-dev
51-
````
52-
53-
Install external dependencies (MacOS) with [Brew](www.brew.sh):
54-
````
55-
brew install openslide
56-
````
57-
58-
Install [OpenJDK 8](https://openjdk.java.net/):
59-
````
60-
conda install openjdk==8.0.152
61-
````
62-
6359
Optionally install CUDA (instructions [here](#CUDA))
6460
6561
Install `PathML` from PyPI:
@@ -144,6 +140,17 @@ After installing PyTorch, optionally verify successful PyTorch installation with
144140
python -c "import torch; print(torch.cuda.is_available())"
145141
````
146142
143+
## Troubleshooting installation
144+
145+
Installation can be fragile at times due to external dependencies.
146+
If having difficulty installing, try the following:
147+
148+
* Look through the GitHub issues to see if someone else has run into the same problem before
149+
* Ensure that the correct versions of all dependencies are installed
150+
* Make sure to use a fresh conda environment
151+
* Use pip's `--no-cache-dir` to prevent using cached files
152+
* Use deterministic environment specifications such as those used in installation options (2) and (3)
153+
147154
# Using with Jupyter
148155
149156
Jupyter notebooks are a convenient way to work interactively. To use `PathML` in Jupyter notebooks:

0 commit comments

Comments
 (0)