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

Make Mayavi optional #455

Merged
merged 6 commits into from
Mar 7, 2023
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
50 changes: 30 additions & 20 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

## Installation Options

MagellanMapper can be installed depending on one's Python preferences.
MagellanMapper supports several Python setups.

### Install using Conda

Expand Down Expand Up @@ -41,27 +41,28 @@ Install using Pip with Python >= 3.6 (see [Python versions](#python-version-supp
pip install magellanmapper[most] --extra-index-url https://pypi.fury.io/dd8/
```

The `most` group installs the GUI and file import tools. The extra index accesses a few [customized dependencies](#custom-packages) for MagellanMapper.
The `most` group installs the GUI and file import tools (see [optional dependencies below](#optional-installation-groups)). The extra index accesses a few [customized dependencies](#custom-packages) for MagellanMapper.

Java will need to be installed to support more image formats (eg from [here](https://www.azul.com/downloads/?package=jdk)).

### Developer installs

If you download the source code, you can install in developer mode for the latest updates and any changes you make.
You can install directly from the source code for the latest updates.

Download the repo:
First, download the repo:

```shell
git clone https://github.com/sanderslab/magellanmapper.git
```

For Conda:
Next, install it:
- For Conda:

```shell
conda env create -n mag -f environment.yml
```

Or Pip:
- Or Pip:

```shell
pip install -e .[most] --extra-index-url https://pypi.fury.io/dd8/
Expand Down Expand Up @@ -152,7 +153,7 @@ On Windows, the [Microsoft Visual C++ Redistributable for Visual Studio 2015, 20
If installed from a Python package, enter your virtual environment and run:

```shell
pip install -U magellanmapper --extra-index-url https://pypi.fury.io/dd8/
pip install -U magellanmapper --extra-index-url https://pypi.fury.io/dd8/
```

If installed from source:
Expand All @@ -167,27 +168,15 @@ Sometimes a virtual environment update is required for new depdendencies.

## Dependencies

The main required and optional dependencies in MagellanMapper are:

- Scipy, Numpy, Matplotlib stack
- Mayavi/TraitsUI/Qt stack for GUI and 3D visualization
- Scikit-image for image processing
- Scikit-learn for machine learning based stats
- Pandas for stats
- [SimpleElastix](https://github.com/SuperElastix/SimpleElastix), a fork of SimpleITK with Elastix integrated (see below)
- Python-Bioformats/Javabridge for importing images from propriety formast such as `.czi` (optional, requires Java SDK and C compiler)

### Python version support

| MagellanMapper Version | Python Versions Supported | Deprecations |
|-----|-----|-----|
| < 1.4 | 3.6 | None |
| 1.4-1.5 | 3.6-3.9 (no GUI support in 3.9) | None |
| 1.6a1-a2 | 3.6-3.9 (GUI support added for 3.9; MM 1.6a2 base group no longer installs GUI) | 3.6-3.7 to be removed in MM 1.7 |
| 1.6a1-a3 | 3.6-3.9 (GUI support added for 3.9; MM 1.6a2 base group no longer installs GUI) | 3.6-3.7 to be removed in MM 1.7 |
| 1.6b1 | 3.6-3.11 (no GUI support in 3.10-3.11 as of 2022-12-30) | Same |

The `bin/setup_multi_venvs.sh`, `bin/build_deps.sh`, and their `.bat` counterparts are provided to build these dependencies for multiple Python versions.

As of MM 1.6a2, the GUI can be excluded by installing the base group, eg without `[gui]` or `[most]`.

### Pinned packages
Expand All @@ -199,6 +188,21 @@ We've provided a few sets of pinned dependency versions:

These package versions are used for automated testing (continuous integration).

### Optional installation groups

| Group | Packages | Collection |
|-----|-----|-----|
| `most` | Import and GUI tools | Has `import`, `gui` |
| `all` | All groups plus `seaborn`, `scikit-learn` | Has all below |
| `import` | Imports proprietary image formats | |
| `gui` | Main graphical interface | |
| `pandas_plus` | Exports styled and Excel formats | |
| `aws` | Tools for accessing AWS | |
| `docs` | Tools for building docs | |
| `jupyter` | Running Notebooks | |
| `classifer` | Tensorflow | |
| `3D` | 3D rendering | |

### Optional Dependency Build and Runtime Requirements

#### Custom packages
Expand Down Expand Up @@ -418,6 +422,12 @@ Additional errors:

- An error with VTK has prevented display of 3D images at least as of VTK 8.1.2 on RHEL 7.5, though the same VTK version works on Ubuntu 18.04

```Building TVTK classes... Windows fatal exception: code 0xc0000374``` or ```Building TVTK classes... Fatal Python error: Segmentation fault```

* Appears to be a sporadic installation issue (see [issue](https://github.com/sanderslab/magellanmapper/issues/401))
* Workaround: reinstall Mayavi: `pip install mayavi`
* Starting with MM v1.6a4, Mayavi will no longer be installed by defaul

### Display issues

#### Window is too large for screen
Expand Down
4 changes: 3 additions & 1 deletion docs/release/release_v1.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Smoother, faster interactions with main plots, including atlas label name display, label editing, and pan and zoom navigation
- Available as binary wheel to install without requiring the source code
- Faster, lighter installation with fewer required dependency packages
- Simpler entry point to launch MagellanMapper: `mm`
- Atlases can be downloaded directly through [`BrainGlobe`](https://github.com/brainglobe/bg-atlasapi) (see the new "Atlases" panel)
- Atlas regions can be searched (see "Atlases > Region")
Expand Down Expand Up @@ -177,7 +178,8 @@
- Updated to use the `axis_channel` parameter in Scikit-image's `transform.rescale` function (#115)
- Seaborn as an optional dependency for additional plot support (currently only swarm plots, #137)
- Scikit-learn is an optional rather than a required dependency (#150)
- The AWS-related dependencies (`boto3`, `awscli`) are now optional (#150, #379)
- The AWS-related dependencies (`boto3`, `awscli`) are now optional, installed in the `aws` group (#150, #379)
- Mayavi/VTK are now optional, installed in the `3d` group (#455)
- The `jupyter` install group installs packages for running the Jupyter sample commands notebook in a Bash kernel (#122)
- Missing dependencies are starting to use more consistent error messages and instructions (#226)
- Python 3.6 and 3.7 have been deprecated for removal in MM v1.7 and have separate pinned dependencies (`envs/requirements_py3<n>`) (#232, #379)
Expand Down
49 changes: 23 additions & 26 deletions envs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,56 +1,53 @@
--extra-index-url https://pypi.fury.io/dd8/
appdirs==1.4.4
apptools==5.2.0
bg-atlasapi @ https://github.com/brainglobe/bg-atlasapi/archive/dbecd16b2f63a8e167543f3358452a756bad0e64.tar.gz
bg-space==0.6.0
certifi==2022.12.7
charset-normalizer==2.1.1
charset-normalizer==3.0.1
click==8.1.3
commonmark==0.9.1
configobj==5.0.6
contourpy==1.0.6
contourpy==1.0.7
cycler==0.11.0
envisage==6.1.0
fonttools==4.38.0
future==0.18.3
idna==3.4
imagecodecs==2022.12.24
imageio==2.23.0
importlib-resources==5.10.2
imagecodecs==2023.1.23
imageio==2.26.0
importlib-resources==5.12.0
javabridge==1.0.19.post9+gc8c12b4
kiwisolver==1.4.4
matplotlib==3.6.2
lazy_loader==0.1
markdown-it-py==2.2.0
matplotlib==3.7.0
matplotlib-scalebar==0.8.1
mayavi==4.8.1
mdurl==0.1.2
meshio==5.3.4
networkx==2.8.8
networkx==3.0
numpy==1.24.2
packaging==22.0
packaging==23.0
pandas==1.5.3
Pillow==9.4.0
pyamg==4.2.3
pyface==7.4.4
Pygments==2.14.0
pyparsing==3.0.9
PyQt5==5.15.7
PyQt5==5.15.9
PyQt5-Qt5==5.15.2
PyQt5-sip==12.11.0
PyQt5-sip==12.11.1
python-bioformats==4.0.7.post5+g52309d1
python-dateutil==2.8.2
pytz==2022.7
pytz==2022.7.1
PyWavelets==1.4.1
PyYAML==6.0
requests==2.28.1
rich==13.0.0
scikit-image==0.19.3
scipy==1.10.0
requests==2.28.2
rich==13.3.1
scikit-image==0.20.0
scipy==1.9.1
SimpleITK==2.3.0.dev117+g0640d
six==1.16.0
tifffile==2022.10.10
tifffile==2023.2.28
traits==6.4.1
traitsui==7.4.2
traitsui==7.4.3
treelib==1.6.1
typing_extensions==4.4.0
urllib3==1.26.13
vtk==9.2.4
zipp==3.11.0
typing_extensions==4.5.0
urllib3==1.26.14
zipp==3.15.0
41 changes: 13 additions & 28 deletions envs/requirements_py36
Original file line number Diff line number Diff line change
@@ -1,28 +1,19 @@
--extra-index-url https://pypi.fury.io/dd8/
aiohttp==3.8.1
aiosignal==1.2.0
appdirs==1.4.4
apptools==5.1.0
async-timeout==4.0.2
asynctest==0.13.0
attrs==21.4.0
bg-atlasapi @ https://github.com/brainglobe/bg-atlasapi/archive/dbecd16b2f63a8e167543f3358452a756bad0e64.tar.gz
bg-space==0.6.0
boto3==1.23.10
botocore==1.26.10
certifi==2022.6.15
certifi==2022.12.7
charset-normalizer==2.0.12
click==8.0.4
commonmark==0.9.1
configobj==5.0.6
cycler==0.11.0
dataclasses==0.8;python_version<"3.7"
dataclasses==0.8
decorator==4.4.2
envisage==6.0.1
frozenlist==1.2.0
future==0.18.2
idna==3.3
idna-ssl==1.1.0
future==0.18.3
idna==3.4
imagecodecs==2020.5.30
imageio==2.15.0
importlib-metadata==4.8.3
importlib-resources==5.4.0
Expand All @@ -31,40 +22,34 @@ jmespath==0.10.0
kiwisolver==1.3.1
matplotlib==3.3.4
matplotlib-scalebar==0.7.2
mayavi==4.8.0
meshio==4.4.6
multidict==5.2.0
networkx==2.5.1
numpy==1.19.5
pandas==1.1.5
Pillow==8.4.0
pyamg==4.2.3
pyface==7.4.2
Pygments==2.12.0
pyface==7.4.4
Pygments==2.14.0
pyparsing==3.0.9
PyQt5==5.15.6
PyQt5-Qt5==5.15.2
PyQt5-sip==12.9.1
python-bioformats==4.0.5.post2+g51eb88a
python-dateutil==2.8.2
pytz==2022.1
pytz==2022.7.1
PyWavelets==1.1.1
PyYAML==6.0
requests==2.27.1
rich==12.5.1
rich==12.6.0
s3transfer==0.5.2
scikit-image==0.17.2;python_version<"3.9"
scikit-image==0.19.3;python_version>="3.9"
scikit-image==0.17.2
scipy==1.5.4
SimpleITK==2.0.2rc2.dev785+g8ac4f
six==1.16.0
tifffile==2020.9.3
traits==6.3.2
traitsui==7.4.0
traits==6.4.1
traitsui==7.4.3
treelib==1.6.1
typing_extensions==4.1.1
urllib3==1.26.11
vtk==9.1.0
wslink==1.6.6
yarl==1.7.2
urllib3==1.26.14
zipp==3.6.0
61 changes: 24 additions & 37 deletions envs/requirements_py37
Original file line number Diff line number Diff line change
@@ -1,69 +1,56 @@
--extra-index-url https://pypi.fury.io/dd8/
aiohttp==3.8.3
aiosignal==1.2.0
appdirs==1.4.4
apptools==5.2.0
async-timeout==4.0.2
asynctest==0.13.0
attrs==22.1.0
bg-atlasapi @ https://github.com/brainglobe/bg-atlasapi/archive/dbecd16b2f63a8e167543f3358452a756bad0e64.tar.gz
bg-space==0.6.0
boto3==1.24.93
botocore==1.27.93
certifi==2022.9.24
charset-normalizer==2.1.1
boto3==1.26.83
botocore==1.29.83
certifi==2022.12.7
charset-normalizer==3.0.1
click==8.1.3
commonmark==0.9.1
configobj==5.0.6
cycler==0.11.0
envisage==6.1.0
fonttools==4.37.4
frozenlist==1.3.1
future==0.18.2
fonttools==4.38.0
future==0.18.3
idna==3.4
imagecodecs==2021.11.20
imageio==2.22.2
importlib-metadata==5.0.0
importlib-resources==5.10.0
imageio==2.26.0
importlib-metadata==6.0.0
importlib-resources==5.12.0
javabridge==1.0.19.post4+gbebed64
jmespath==1.0.1
kiwisolver==1.4.4
markdown-it-py==2.2.0
matplotlib==3.5.3
matplotlib-scalebar==0.8.1
mayavi==4.8.1
mdurl==0.1.2
meshio==5.3.4
multidict==6.0.2
networkx==2.6.3
numpy==1.21.6
packaging==21.3
packaging==23.0
pandas==1.3.5
Pillow==9.2.0
Pillow==9.4.0
pyamg==4.2.3
pyface==7.4.2
Pygments==2.13.0
pyface==7.4.4
Pygments==2.14.0
pyparsing==3.0.9
PyQt5==5.15.7
PyQt5==5.15.9
PyQt5-Qt5==5.15.2
PyQt5-sip==12.11.0
PyQt5-sip==12.11.1
python-bioformats==4.0.5.post2+g51eb88a
python-dateutil==2.8.2
pytz==2022.5
pytz==2022.7.1
PyWavelets==1.3.0
PyYAML==6.0
requests==2.28.1
rich==12.6.0
requests==2.28.2
rich==13.3.1
s3transfer==0.6.0
scikit-image==0.19.3
scipy==1.7.3
SimpleITK==2.0.2rc2.dev785+g8ac4f
six==1.16.0
tifffile==2021.11.2
traits==6.4.1
traitsui==7.4.1
traitsui==7.4.3
treelib==1.6.1
typing_extensions==4.4.0
urllib3==1.26.12
vtk==9.2.2
wslink==1.8.4
yarl==1.8.1
zipp==3.9.0
typing_extensions==4.5.0
urllib3==1.26.14
zipp==3.15.0
Loading