# Installation¶

## Installation with conda¶

On Linux platforms, the most comfortable way to install bert is via the conda package manager contained in the Anaconda distribution. Anaconda is a scientific Python distribution with more than 100 Python packages included (~400 Mb). You can also use the lightweight alternative Miniconda (~35 Mb) and only install the packages you like to use. Notes on how to install Miniconda (without root privileges) can be found here. pybert packages are available for Python 3.5 and 3.6.

# Add gimli and conda-forge channel (you only need to do this once)

# Install pybert (and all dependencies such as pygimli, numpy, mpl, tetgen)
conda install -f pybert

# After installation, you can try out the examples for testing
cd ~/miniconda3/share/examples/inversion/2dflat/gallery
bert gallery.cfg all
bert gallery.cfg show

# Update to a newer version
conda update -f pygimli pybert


## Windows binary installers¶

On Windows 64bit platforms (Win 7, 8 and 10) we provide binary installers named py36, py35 (and py34) to be used along with a 64bit Python 3.6.x, 3.5.x (or 3.4.x), respectively. We recommend package installers like Anaconda or WinPython that bring along a lot of useful packages like numpy and matplotlib (used for numerics and plotting).

There are some additional hints in Appendix A of Tutorial. The newest Windows installers are found here:

Latest Python 3.4 installer

We avoid installers for 32bit Windows (very rare). There might be installers for Python 2.7 (64bit) upon request, however we are dropping Python 2.7 compatibility eventually. Just like for pyGIMLi, we are focusing on Python 3.6 and still provide distributions for 3.5. Ask the developers directly for versions on 32bit, Python 2.7 or <=3.4.

Please direct new users to this project page instead of just sharing this link so that they will get aware for new versions.

## Compiling from source¶

You need a working GIMLi installation first. Then create your BERT target path preferable at the same level as your GIMLi path.

mkdir bert
cd bert


git clone https://gitlab.com/resistivity-net/bert.git


Create a build path.

mkdir build
cd build


cmake ../bert


The -G option can be used to specify cmake options, e.g. for Windows

cmake -G "MSYS Makefiles"


You might have to specify the directories where GIMLI they are not found automatically.

cmake ../bert -DGIMLI_SRC=../../gimli/gimli


Or you can specify the path to the library and the header files separately.

cmake ../bert -DGIMLI_LIBRARIES=/path/to/libgimli.so -DGIMLI_INCLUDE_DIR=/path/to/gimli/src


After cmake finds everything, compile the BERT applications (dcmod, dcinv and dcedit).

make


Note that there is no core C++ library anymore since June 2017 when the core moved to pygimli. If you need the polyTools and mesh generation stuff (recommended) run additionally:

make bert1


Until we fixed some issues in the automatic installation, you can simple add the bert paths user setting variables.

export PATH=$PATH:PATH_TO_YOUR_BERTROOT/build/bin export PYTHONPATH=$PYTHONPATH:PATH_TO_YOUR_BERTROOT/bert/python


Some further hints, troubleshooting or additional cmake commands are the same as for your GIMLi installation and can be found here http://pygimli.org/installation.html.

cd bert/bert

cd ../build