2.1. For Windows#
On Windows computers the installation of TetraX requires to install a C compiler first. The easiest way is to do the following steps:
Downloaded Microsoft Visual C++ Build Tools from this link: https://visualstudio.microsoft.com/downloads/
Run the installer
Select: Workloads → Visual C++ build tools.
Install options: select only the “Windows 10 SDK” (assuming the computer is Windows 10)
After this, proceed with the next section.
2.2. Setting up python distribution#
On all systems we recommend to use the Anaconda python distribution. To be able to install TetraX from our repository, you might need to run the following commands in a command line shell (on Windows using the Anaconda prompt):
conda install pip
pip install git
2.3. Installing TetraX from HZDR repository#
To install this package on a computer with administrator rights use .
pip install git+https://gitlab.hzdr.de/micromagnetic-modeling/tetrax.git
On a cluster with no administrator rights you need to add the –user option:
pip install git+https://gitlab.hzdr.de/micromagnetic-modeling/tetrax.git --user
During the installation the pip package manager will check the dependencies and install all python related packages the TetraX uses.
NOTE: To avoid updating your packages, please create a python virtual environment, activate it and install both the Jupyter notebook as well as the TetraX in this virtual environment. After your finite element simulations are done you can deactivate your virtual environment.
To allow for 3D visualization in Jupyter notebooks, you additionally need to activate the k3d extension in your shell using
$ jupyter nbextension install --py --sys-prefix k3d
$ jupyter nbextension enable --py --sys-prefix k3d
Now you are ready to use TetraX in your python scripts or Jupyter notebook.
import tetrax as tx