3,795 bytes added,
06:43, 8 September 2017 == Install on Redhat 7.3 or mac ==
We will install relax on Red Hat Enterprise Linux Workstation release 7.3<br>
It should work for similar linux systems.
We will assume, that you do not have any sudo privileges to add rpm-packages.<br>
Or, that you would like to make a standalone system.
Therefore, we need to be able to install a local version of python.<br>
We will use anaconda for this.
Get anaconda python
# Head to: https://conda.io/miniconda.html
# Chose the minimal installer: Python 2.7, 64-bit (bash installer)
Start installation of anaconda
<syntaxhighlight lang="bash">
# Go to download
cd $HOME/Downloads
# Make installer executable
chmod +x Miniconda2-latest-Linux-x86_64.sh
./Miniconda2-latest-Linux-x86_64.sh
</syntaxhighlight>
Add anaconda to your PATH
<syntaxhighlight lang="bash">
cd $HOME
touch .cshrc
echo '# Anaconda' >>.cshrc
echo 'set path = (${HOME}/miniconda2/bin $path)' >> .cshrc
</syntaxhighlight>
If you are using mac and BASH, then in $HOME/.bash_profile it should be:
<syntaxhighlight lang="bash">
# added by Anaconda2 4.4.0 installer
export PATH="$HOME/miniconda2/bin:$PATH"
</syntaxhighlight>
Open a new terminal, to let the change take effect.
=== Install dependencies ===
Install wxpython
<syntaxhighlight lang="bash">
# Does not work yet! Version 4: https://anaconda.org/conda-forge/wxpython
#conda install -c conda-forge wxpython
# Version 3: https://anaconda.org/anaconda/wxpython
conda install -c anaconda wxpython
# Check version
python -c "import wx;print wx.__version__"
</syntaxhighlight>
Install numpy. September 2017, there was a problem with numpy. Therefore this selection of version
<syntaxhighlight lang="bash">
# https://anaconda.org/anaconda/numpy
conda install -c anaconda numpy=1.12.1
# Check version
python -c "import numpy;print numpy.__version__"
</syntaxhighlight>
Install scipy and matplotlib
<syntaxhighlight lang="bash">
# https://anaconda.org/anaconda/scipy
conda install -c anaconda scipy
# Check version
python -c "import scipy;print scipy.__version__"
# https://anaconda.org/anaconda/matplotlib
conda install -c anaconda matplotlib
# Check version
python -c "import matplotlib;print matplotlib.__version__"
</syntaxhighlight>
Install [[Bmrblib]]
{{#tag:source|
#In tcsh: set v={{current version bmrblib}}
#In bash: v={{current version bmrblib}}
set v={{current version bmrblib}}
cd $HOME/Downloads
wget https://sourceforge.net/projects/bmrblib/files/$v/bmrblib-$v.tar.gz
tar -xzf bmrblib-$v.tar.gz
rm bmrblib-$v.tar.gz
cd bmrblib-$v
pip install .
cd ..
python -c "import bmrblib;print bmrblib.__version__, bmrblib.__file__"
|lang="bash"
}}
Install [[Minfx]]
{{#tag:source|
#In tcsh: set v={{current version minfx}}
#In bash: v={{current version minfx}}
set v={{current version minfx}}
cd $HOME/Downloads
wget https://sourceforge.net/projects/minfx/files/$v/minfx-$v.tar.gz
tar -xzf minfx-$v.tar.gz
rm minfx-$v.tar.gz
cd minfx-$v
pip install .
cd ..
python -c "import minfx;print minfx.__version__, minfx.__file__"
|lang="bash"
}}
Install scons
<syntaxhighlight lang="bash">
conda install -c anaconda scons
</syntaxhighlight>
Restart terminal, to make scons available
=== Install relax ===
<syntaxhighlight lang="bash">
cd $HOME/Downloads
# Clone relax
git clone https://git.code.sf.net/p/nmr-relax/code nmr-relax-code
cd nmr-relax-code
# Build
scons
# Test installation
# See version and package details
./relax -i
# Run unittest
./relax -u
# Try open GUI
./relax -g
# Run system tests
./relax -s --time
# Run GUI tests
./relax --gui-tests --time
</syntaxhighlight>
Make a alias to relax
<syntaxhighlight lang="bash">
echo '# nmr-relax' >> ${HOME}/.cshrc
echo "alias relax ${PWD}/relax" >> ${HOME}/.cshrc
</syntaxhighlight>
Restart terminal to take effect
== See also ==
[[Category:Installation]]