-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
40 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,55 @@ | ||
# Installation | ||
|
||
See our general advice | ||
[on using Python](https://fluiddyn.readthedocs.io/en/latest/advice_on_Python.html) and | ||
[on installing a good scientific Python environment](https://fluiddyn.readthedocs.io/en/latest/get_good_Python_env.html). | ||
First, ensure that you have a recent Python installed, since Fluidimage requires | ||
Python >= 3.9. Some issues regarding the installation of Python and Python | ||
packages are discussed in | ||
[the main documentation of the project](http://fluiddyn.readthedocs.org/en/latest/install.html). | ||
|
||
## The simplest method (with conda) | ||
Here, we describe installation methods that do not involve local compilation. One | ||
can also install Fluidimage from source as described | ||
[here](./build-from-source.md). | ||
|
||
The simplest method to install FluidImage is to use `conda` (installed with miniconda) | ||
and the conda-forge channel (activated with the command | ||
`conda config --add channels conda-forge`). | ||
## Install with pip | ||
|
||
To just install FluidImage, you can run: | ||
```{note} | ||
``` | ||
conda install fluidimage | ||
``` | ||
|
||
Alternativally, you can install FluidImage in a dedicated conda environment with: | ||
We strongly advice to install Fluidimage in a virtual environment. See the | ||
official guide [Install packages in a virtual environment using pip and | ||
venv](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/). | ||
``` | ||
conda create -n env_fluidimage fluidimage | ||
``` | ||
|
||
If you use an environment, you will need to activate it with | ||
`conda activate env_fluidimage`. | ||
|
||
## Slightly more complicated: with pip, from the package on PyPI or the repository | ||
|
||
FluidImage depends on Python >= 3.6 and on Python packages that are today very simple to | ||
install with pip or conda, namely numpy, scipy, matplotlib, h5py, scikit-image, pyfftw | ||
and IPython. You should not care about these dependencies because they are going to be | ||
installed automatically for you. | ||
|
||
PyQt5 is used only for some graphical user interfaces, so you need to install it manually | ||
if needed. This can be done with `pip install pyqt5` or `conda install pyqt`. | ||
|
||
I would also advice to install Jupyterlab, which interacts nicely with FluidImage. | ||
|
||
### To compile, or not to compile? | ||
|
||
We choose to use the static Python compiler | ||
[Pythran](https://github.com/serge-sans-paille/pythran) for some numerical functions. Our | ||
microbenchmarks show that the performances are as good as what we are able to get with | ||
Fortran or C++! | ||
|
||
We don't upload "wheels" (package with already compiled binaries) on PyPI, so installing | ||
with pip *usually* involves local compilation. | ||
|
||
To disable Pythran compilation during build, one can set the environment variable | ||
`DISABLE_PYTHRAN`. | ||
|
||
If Pythran is used, you need a C++ compiler (we recommend clang). With conda, it's very | ||
easy to install clang with `conda install clangdev`. | ||
|
||
Finally, for better performance, Pythran needs a configuration file with something like | ||
(see the [Pythran documentation](https://pythran.readthedocs.io/en/latest/MANUAL.html)): | ||
Fluidimage can be installed without compilation with `pip`: | ||
|
||
```sh | ||
pip install pip -U | ||
pip install fluidimage | ||
``` | ||
[pythran] | ||
complex_hook = True | ||
|
||
[compiler] | ||
CXX = clang++ | ||
CC = clang | ||
``` | ||
### Optional dependencies | ||
|
||
### Ready? Let's install with pip | ||
Fluidimage has 2 sets of optional dependencies, which can be installed with | ||
commands like `pip install fluidimage[opencv]` or | ||
`pip install fluidimage[opencv, pims]`: | ||
|
||
To install the last version of FluidImage uploaded to the Python Package Index: | ||
- `opencv`: [OpenCV](https://opencv.org/) can be used for some algorithms, | ||
- `pims`: [pims: Python Image Sequence](https://github.com/soft-matter/pims) is | ||
used to read `.cine` files. | ||
|
||
``` | ||
pip install fluidimage -U | ||
``` | ||
## Install the conda-forge packages with conda or mamba | ||
|
||
However, the project is in an active phase of development so it can be better to use the | ||
last version (from the mercurial repository hosted on Heptapod). Moreover, like that, you | ||
get all examples and tutorials! For FluidImage, we use the revision control software | ||
Mercurial and the main repository is hosted in | ||
<https://foss.heptapod.net/fluiddyn/fluidimage>, so you can get the source with the | ||
command: | ||
We recommend installing `conda` and `mamba` (using the \[conda-forge\] channel) | ||
with the [miniforge installer](https://github.com/conda-forge/miniforge). Then, | ||
one can run: | ||
|
||
```sh | ||
mamba install fluidimage | ||
``` | ||
hg clone https://foss.heptapod.net/fluiddyn/fluidimage | ||
``` | ||
|
||
If you are new with Mercurial and Heptapod, you can also read | ||
[this short tutorial](http://fluiddyn.readthedocs.org/en/latest/mercurial_heptapod.html). | ||
|
||
If you really can't use Mercurial, you can also just manually download the package from | ||
[the Heptapod page](https://foss.heptapod.net/fluiddyn/fluidimage) or from | ||
[the PyPI page](https://pypi.python.org/pypi/fluidimage). | ||
One can also create a dedicated environment: | ||
|
||
To install in development mode: | ||
|
||
``` | ||
cd fluidimage | ||
pip install -e . | ||
```sh | ||
mamba create -n env_fluidimage fluidimage | ||
``` | ||
|
||
After the installation, it is a good practice to run the unit tests by running `pytest` | ||
from the root directory. | ||
The environment can then be activated with `conda activate env_fluidimage`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ build-backend = 'mesonpy' | |
|
||
[project] | ||
name = "fluidimage" | ||
version = "0.2.0rc0" | ||
version = "0.2.0" | ||
description = "Fluid image processing with Python." | ||
authors = [ | ||
{name = "Pierre Augier", email = "[email protected]"}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters