You can install emg3d either via
conda install -c conda-forge emg3d
pip install emg3d
Minimum requirements are Python version 3.8 or higher and the modules
numba. Various other packages are recommended or required for some
advanced functionalities, namely:
xarray: For the
emg3d.simulations.Simulationclasses (model many sources and frequencies at once).
discretize: For advanced meshing tools (fancy mesh-representations and plotting utilities).
matplotlib: To use the plotting utilities within
h5py: Save and load data in the HDF5 format.
empymod: Time-domain modelling (
scooby: For the version and system report (
tqdm: For nice progress bars when computing many sources and frequencies.
All soft dependencies are also available both on
To get therefore the complete experience use one of the following options:
conda install -c conda-forge emg3d empymod discretize xarray matplotlib h5py tqdm scooby
pip install emg3d[full]
If you are new to Python we recommend using a Python distribution, which will
ensure that all dependencies are met, specifically properly compiled versions
SciPy; we recommend using Anaconda. If you install Anaconda you can
simply start the Anaconda Navigator, add the channel
emg3d will appear in the package list and can be installed with a click.
Using NumPy and SciPy with the Intel Math Kernel Library (mkl) can
significantly improve computation time. You can check if
mkl is used via
conda list: The entries for the BLAS and LAPACK libraries should contain
mkl, not with
openblas. To enforce it you might have to
create a file
pinned, containing the line
libblas[build=*mkl] in the