Skip to content

Commit 32f6551

Browse files
authored
Merge pull request #1 from imagej/xarray
Fix Travis build
2 parents 59a385f + 7dacccd commit 32f6551

File tree

3 files changed

+39
-14
lines changed

3 files changed

+39
-14
lines changed

.travis/build.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ check () {
1616
}
1717

1818
# -- create a test enviroment --
19-
conda env create -q -f environment.yml
19+
conda create -n imagej -y python=$TRAVIS_PYTHON_VERSION
2020
source activate imagej
21-
conda install -q -y python=$TRAVIS_PYTHON_VERSION
21+
conda env update -f environment.yml
2222

2323
# -- ensure supporting tools are available --
2424
check curl git unzip
@@ -58,6 +58,9 @@ ij_dir=$HOME/Fiji.app
5858
echo "ij_dir = $ij_dir"
5959
python setup.py install
6060

61+
# -- unset JAVA_HOME in case it was set --
62+
unset JAVA_HOME
63+
6164
# -- run tests with local Fiji.app --
6265
python -O test/test_imagej.py --ij "$ij_dir"
6366

README.md

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,43 +11,65 @@ see "ImageJ Server" below for details.
1111

1212
1. Install [Conda](https://conda.io/):
1313
* On Windows, install Conda using [Chocolatey](https://chocolatey.org): `choco install miniconda3`
14-
* On macOS, install Conda using [Homebrew](https://brew.sh): `brew install miniconda`
14+
* On macOS, install Conda using [Homebrew](https://brew.sh): `brew cask install miniconda`
1515
* On Linux, install Conda using its [RPM or Debian package](https://www.anaconda.com/rpm-and-debian-repositories-for-miniconda/), or [with the Miniconda install script](https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html).
1616

17-
2. [Activate the conda-forge channel](https://conda-forge.org/docs/user/introduction.html#how-can-i-install-packages-from-conda-forge):
17+
2. Configure your shell for use with conda:
18+
```
19+
conda init bash
20+
```
21+
Where `bash` is the shell you use.
22+
Then start a new shell instance.
23+
24+
3. [Activate the conda-forge channel](https://conda-forge.org/docs/user/introduction.html#how-can-i-install-packages-from-conda-forge):
1825
```
1926
conda config --add channels conda-forge
2027
conda config --set channel_priority strict
2128
```
2229
23-
3. Install pyimagej into a new conda environment:
30+
4. Install pyimagej into a new conda environment:
2431
```
2532
conda create -n pyimagej pyimagej openjdk=8
2633
```
2734
28-
4. Whenever you want to use pyimagej, activate its environment:
35+
5. Whenever you want to use pyimagej, activate its environment:
2936
```
3037
conda activate pyimagej
3138
```
3239
3340
### Installation asides
3441
35-
* If you want to use [scikit-image](https://scikit-image.org/) in conjunction, as demonstrated below, you can install it also via:
36-
42+
* If you want to use [scikit-image](https://scikit-image.org/) in conjunction,
43+
as demonstrated below, you can install it also via:
3744
```
3845
conda install scikit-image
3946
```
4047
41-
* The above command installs pyimagej with OpenJDK 8; if you leave off the `openjdk=8` it will install OpenJDK 11 by default, which should also work, but is less well tested and may have more rough edges.
48+
* The above command installs pyimagej with OpenJDK 8; if you leave off the
49+
`openjdk=8` it will install OpenJDK 11 by default, which should also work, but
50+
is less well tested and may have more rough edges.
4251
4352
* It is possible to dynamically install pyimagej from within a Jupyter notebook:
44-
4553
```
4654
import sys
4755
!conda install --yes --prefix {sys.prefix} -c conda-forge pyimagej openjdk=8
4856
```
49-
50-
* If you would prefer to install pyimagej via pip, more legwork is required. See [this thread](https://forum.image.sc/t/how-do-i-install-pyimagej/23189/4) for hints.
57+
This approach is useful for [JupyterHub](https://jupyter.org/hub) on the
58+
cloud, e.g. [Binder](https://mybinder.org/), to utilize pyimagej in select
59+
notebooks without advance installation. This reduces time needed to create
60+
and launch the environment, at the expense of a longer startup time the first
61+
time a pyimagej-enabled notebook is run. See [this itkwidgets example
62+
notebook](https://github.com/InsightSoftwareConsortium/itkwidgets/blob/v0.24.2/examples/ImageJImgLib2.ipynb)
63+
for an example.
64+
65+
* It is possible to dynamically install pyimagej on
66+
[Google Colab](https://colab.research.google.com/). See
67+
[this thread](https://forum.image.sc/t/pyimagej-on-google-colab/32804) for
68+
guidance. A major advantage of Google Colab is free GPU in the cloud.
69+
70+
* If you would prefer to install pyimagej via pip, more legwork is required.
71+
See [this thread](https://forum.image.sc/t/how-do-i-install-pyimagej/23189/4)
72+
for hints.
5173
5274
## Usage
5375

environment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: imagej
22
channels:
33
- conda-forge
44
dependencies:
5-
- imglyb
5+
- imglyb=0.3.5
66
- matplotlib
77
- numpy
88
- openjdk=8
9-
- pyjnius
9+
- pyjnius=1.2.0
1010
- scyjava
1111
- pillow # for server
1212
- requests # for server

0 commit comments

Comments
 (0)