A CPU & GPU compatible Python package for Electron Paramagnetic Resonance Imaging
Project description
PyEPRI
Advanced Algorithms and Low-Level Operators for Electron Paramagnetic Resonance Imaging.
Package documentation and tutorials are available here.
If you have any comments, questions, or suggestions regarding this code, don't hesitate to open a discussion or a bug issue.
Installation
Install latest stable version using pip
Assuming you have a compatible system with python3
and pip
installed, the following steps will create a virtual environment, and
install the latest stable version of pyepri
.
###################################################
# Create and activate a fresh virtual environment #
###################################################
python3 -m venv ~/.venv/pyepri
source ~/.venv/pyepri/bin/activate
#########################################################
# Install the `pyepri` package from the PyPi repository #
#########################################################
pip install pyepri
################################################################
# Optionally (and advised if you have a GPU device with CUDA #
# installed), you can enable `torch` and/or `cupy` backends by #
# executing the following commands #
################################################################
# enable `torch` backend support
pip install pyepri[torch] # for enabling `torch` backend support
# enable `cupy` backend support: you need to select the
# appropriate line depending on your system
#
# PLEASE BE CAREFUL NOT TO INSTALL MULTIPLE CUPY PACKAGES AT
# THE SAME TIME TO AVOID INTERNAL CONFLICTS
#
pip install pyepri[cupy-cuda12x] # For CUDA 12.x
pip install pyepri[cupy-cuda11x] # For CUDA 11.x
Install latest stable version from sources
Assuming you have a compatible system with python3
, pip
and git
installed, the following steps will checkout current code release,
create a virtual environment, and install pyepri
.
##################
# Clone the code #
##################
git clone https://github.com/remy-abergel/pyepri.git
cd pyepri
###################################################
# Create and activate a fresh virtual environment #
###################################################
python3 -m venv ~/.venv/pyepri
source ~/.venv/pyepri/bin/activate
##########################################################
# Install the `pyepri` package from the checked out code #
# (do not forget the . at the end of the command line) #
##########################################################
pip install -e .
################################################################
# Optionally (and advised if you have a GPU device with CUDA #
# installed), you can enable `torch` and/or `cupy` backends by #
# executing the following commands #
################################################################
# enable `torch` backend support
pip install ".[torch]" # for enabling `torch` backend support
# enable `cupy` backend support: you need to select the
# appropriate line depending on your system
#
# PLEASE BE CAREFUL NOT TO INSTALL MULTIPLE CUPY PACKAGES AT
# THE SAME TIME TO AVOID INTERNAL CONFLICTS
#
pip install ".[cupy-cuda12x]" # For CUDA 12.x
pip install ".[cupy-cuda11x]" # For CUDA 11.x
################################################################
# If you want to compile the documentation by yourself, you #
# must install the [doc] optional dependencies of the package, #
# compilation instructions are provided next #
################################################################
pip install -e ".[doc]" # install some optional dependencies
make -C docs html # build the documentation in html format
firefox docs/_build/html/index.html # open the built documentation (you can replace firefox by any other browser)
Because this installation was done in editable mode (thanks to the
-e
option of pip
), any further update of the repository (e.g.,
using the syncing commang git pull
) will also update the current
installation of the package.
Troubleshooting
-
If the installation of the package or one of its optional dependency fails, you may have more chance with miniconda (or conda).
-
If you still encounter difficulties, feel free to open a bug issue.
License
PyEPRI was created by Rémy Abergel (Centre National de la Recherche Scientifique, Université Paris Cité, Laboratoire MAP5). It is licensed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyepri-1.0.1.tar.gz
.
File metadata
- Download URL: pyepri-1.0.1.tar.gz
- Upload date:
- Size: 66.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 336ff4b6474dd80e3d83f3e8a91dd62808ad2452dd0df3a1c40f10ff75a345d2 |
|
MD5 | 016bc9dd8b836f667a08277c3eee6d2e |
|
BLAKE2b-256 | 687e6f057eb4cbc0b9ea5424bf9963bd645d85073e4073d79defe8e2bca049f0 |
File details
Details for the file pyepri-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: pyepri-1.0.1-py3-none-any.whl
- Upload date:
- Size: 57.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c42b651866abca5b5e0a621432164b182b66ca01b2f5cb7078fd806112e344cf |
|
MD5 | c075006785ad654e812b6ae689d8d31b |
|
BLAKE2b-256 | c0419ae38bb0b76e6385eaa68ce9a590a804379f9f8ba9319efbb35502744f04 |