Difference between revisions of "Installation mac"

From relax wiki
Jump to navigation Jump to search
Line 57: Line 57:
 
>>> minfx.__file__
 
>>> minfx.__file__
 
'...'
 
'...'
 +
</source>
 +
 +
== Checking out a relax branch ==
 +
If you would like to play with relax branch rather than the main [http://www.nmr-relax.com/download.html relax downloads], the [http://subversion.tigris.org/ Subversion] program should first be installed. <br>
 +
You can see the different branches [http://svn.gna.org/viewcvs/relax/ here.] <br>
 +
First the relax sources can be checked out of the source code repository and the C modules compiled:
 +
<source lang="bash">
 +
cd /usr/local/
 +
svn co svn://svn.gna.org/svn/relax/branches/relax_disp relax_disp
 +
cd relax_disp
 +
scons
 +
 +
# Optional building of the user manual, if a LaTeX installation is available.
 +
scons user_manual_pdf
 +
</source>
 +
 +
If the svn command does not work, try:
 +
<source lang="bash">
 +
svn co http://svn.gna.org/svn/relax/branches/relax_disp relax_disp
 +
</source>
 +
 +
 +
=== Add relax to path ===
 +
<source lang="bash">
 +
cd /usr/local/bin
 +
ln -s /usr/local/relax_disp/relax .
 +
</source>
 +
Restart the terminal, to load the new variables.
 +
 +
Start relax in GUI mode
 +
<source lang="bash">
 +
relax -g
 
</source>
 
</source>
  
 
== See also ==
 
== See also ==
 
[[Category:Installation]]
 
[[Category:Installation]]

Revision as of 17:56, 20 July 2013

Installing the relax dependencies

The python-devel and scons packages are only required if the C modules need to be compiled for your system.
The Grace software is used for visualisation of 2D data sets.

macports

Not explained yet. Please provide your solution, if you know it.

fink

Not explained yet. Please provide your solution, if you know it

homebrew

See this email thread.

Download and install Apple's Xcode. Install the "Command Line Tools" from inside Xcode. Install Homebrew by typing into your Terminal:

ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"

Install python 2.7 including pip package manager, scons for relaxation compiling and wxPython for a native Mac GUI:

brew install python scons wxmac

Install numpy via pip (don't install scipy, as it causes problems with scons!)

pip install numpy

Minfx and Bmrblib

Remember to check, if there are newer versions of minfx and bmrblib.
The minfx and bmrblib libraries can be installed on all Linux systems by typing:

wget http://download.gna.org/minfx/minfx-1.0.5.tar.gz
tar -xzf minfx-1.0.5.tar.gz
cd minfx-1.0.5
python setup.py install
cd ..

wget http://download.gna.org/bmrblib/bmrblib-1.0.3.tar.gz
tar -xzf bmrblib-1.0.3.tar.gz
cd bmrblib-1.0.3
python setup.py install
cd ..

Testing the Python installation

Before installing relax, it is best to be sure that the Python modules are functional by importing them:

$ python
Python 2.6.6 (r266:84292, Oct 12 2012, 14:23:48)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2

>>> import wx
>>> wx.__file__
'...'

>>> import bmrblib
>>> bmrblib.__file__
'...'

>>> import minfx
>>> minfx.__file__
'...'

Checking out a relax branch

If you would like to play with relax branch rather than the main relax downloads, the Subversion program should first be installed.
You can see the different branches here.
First the relax sources can be checked out of the source code repository and the C modules compiled:

cd /usr/local/
svn co svn://svn.gna.org/svn/relax/branches/relax_disp relax_disp
cd relax_disp
scons

# Optional building of the user manual, if a LaTeX installation is available.
scons user_manual_pdf

If the svn command does not work, try:

svn co http://svn.gna.org/svn/relax/branches/relax_disp relax_disp


Add relax to path

cd /usr/local/bin
ln -s /usr/local/relax_disp/relax .

Restart the terminal, to load the new variables.

Start relax in GUI mode

relax -g

See also