-
Notifications
You must be signed in to change notification settings - Fork 62
How to install AMICO
pip install dmri-amico
or
pip install --upgrade dmri-amico
to upgrade to the latest version.
Windows | MacOS | Linux | |
---|---|---|---|
Python 3.6 | cp36-win_amd64 cp36-win32 |
cp36-macosx_x86_64 | cp36-manylinux_x86_64 cp36-manylinux_aarch64 |
Python 3.7 | cp37-win_amd64 cp37-win32 |
cp37-macosx_x86_64 | cp37-manylinux_x86_64 cp37-manylinux_aarch64 |
Python 3.8 | cp38-win_amd64 cp38-win32 |
cp38-macosx_x86_64 cp38-macosx_arm64 |
cp38-manylinux_x86_64 cp38-manylinux_aarch64 |
Python 3.9 | cp39-win_amd64 cp39-win32 |
cp39-macosx_x86_64 cp39-macosx_arm64 |
cp39-manylinux_x86_64 cp39-manylinux_aarch64 |
Python 3.10 | cp310-win_amd64 cp310-win32 |
cp310-macosx_x86_64 cp310-macosx_arm64 |
cp310-manylinux_x86_64 cp310-manylinux_aarch64 |
Python 3.11 | cp311-win_amd64 cp311-win32 |
cp311-macosx_x86_64 cp311-macosx_arm64 |
cp311-manylinux_x86_64 cp311-manylinux_aarch64 |
Python 3.12 | cp312-win_amd64 cp312-win32 |
cp312-macosx_x86_64 cp312-macosx_arm64 |
cp312-manylinux_x86_64 cp312-manylinux_aarch64 |
Note
MacOS wheels require MacOS 12.0 (Monterey) or later. If you are using an older version of MacOS, you can build dmri-amico
from source (see the instructions below).
Note
If any of the prebuilt wheels listed above are compatible with your system, please feel free to contact us or open an issue here.
Important
To build and install dmri-amico
you need to have the OpenBLAS library on your system. Other BLAS/LAPACK libraries may be supported in the future (e.g. Intel MKL). You can find instructions on how to compile and install OpenBLAS at www.openblas.net.
git clone https://github.com/daducci/AMICO.git
cd AMICO
The location of the OpenBLAS library must be specified in a site.cfg
file located in the root of the AMICO
repository. You can use the setup_site.py
helper script, which will create a site.cfg
file with the specified settings for you.
Help
python setup_site.py --help
usage: setup_site.py [-h] section library library_dir include_dir
positional arguments:
section Section name
library Library name
library_dir Library directory path
include_dir Include directory path
optional arguments:
-h, --help show this help message and exit
Windows
python setup_site.py openblas libopenblas C:\OpenBLAS\lib C:\OpenBLAS\include
MacOS/Linux
python setup_site.py openblas openblas /home/OpenBLAS/lib /home/OpenBLAS/include
You can create a site.cfg
file by yourself. See the site.cfg.example
file included in the AMICO
repository for documentation.
Windows
[openblas]
libraries = libopenblas
library_dirs = C:\OpenBLAS\lib
include_dirs = C:\OpenBLAS\include
MacOS/Linux
[openblas]
libraries = openblas
library_dirs = /home/OpenBLAS/lib
include_dirs = /home/OpenBLAS/include
pip install .
On MacOS and Linux, you need to specify the path to the OpenBLAS dynamic library. You can do this by setting the DYLD_LIBRARY_PATH
environment variable on MacOS or the LD_LIBRARY_PATH
environment variable on Linux.
MacOS
export DYLD_LIBRARY_PATH=/home/OpenBLAS/lib
Linux
export LD_LIBRARY_PATH=/home/OpenBLAS/lib
Tip
You can add the DYLD_LIBRARY_PATH
or LD_LIBRARY_PATH
environment variable to your shell profile (e.g. .bashrc
, .bash_profile
, .zshrc
, etc.) to make it permanent.
On Windows, you need to add the OpenBLAS dynamic library with the os.add_dll_directory()
method before importing the amico
module. For example, you can do this at the beginning of your Python code.
import os
os.add_dll_directory('C:\\OpenBLAS\\bin')