Anaconda linux mac
Install on Redhat 7.3 or mac
We will install relax on Red Hat Enterprise Linux Workstation release 7.3
It should work for similar linux systems.
We will assume, that you do not have any sudo privileges to add rpm-packages.
Or, that you would like to make a standalone system.
Therefore, we need to be able to install a local version of python.
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
# Go to download
cd $HOME/Downloads
# Make installer executable
chmod +x Miniconda2-latest-Linux-x86_64.sh
./Miniconda2-latest-Linux-x86_64.sh
Add anaconda to your PATH
cd $HOME
touch .cshrc
echo '# Anaconda' >>.cshrc
echo 'set path = (${HOME}/miniconda2/bin $path)' >> .cshrc
If you are using mac and BASH, then in $HOME/.bash_profile it should be:
# added by Anaconda2 4.4.0 installer
export PATH="$HOME/miniconda2/bin:$PATH"
Open a new terminal, to let the change take effect.
Install dependencies
Install wxpython
# 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__"
Install numpy. September 2017, there was a problem with numpy. Therefore this selection of version
# https://anaconda.org/anaconda/numpy
conda install -c anaconda numpy=1.12.1
# Check version
python -c "import numpy;print numpy.__version__"
Install scipy and matplotlib
# 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__"
Install Bmrblib
#In tcsh: set v=1.0.4
#In bash: v=1.0.4
set v=1.0.4
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__"
Install Minfx
#In tcsh: set v=1.0.12
#In bash: v=1.0.12
set v=1.0.12
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__"
Install scons
conda install -c anaconda scons
Restart terminal, to make scons available
Install relax
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
# On a mac, if you get this error:
## This program needs access to the screen.
## Please run with a Framework build of python, and only when you are
## logged in on the main display of your Mac.
# Then you should use "pythonw" instead of "python"
pythonw ./relax -g
# Run system tests
./relax -s --time
# Run GUI tests
./relax --gui-tests --time
Make an alias to relax
cd $HOME/Downloads
mkdir -p $HOME/software
mv nmr-relax-code $HOME/software
echo '# nmr-relax' >> ${HOME}/.cshrc
echo 'alias relax ${HOME}/software/nmr-relax-code/relax' >> ${HOME}/.cshrc
Restart terminal to take effect