Open main menu

Changes

Installation mac

591 bytes added, 11:49, 27 October 2017
→‎Check out a relax branch: Transclusion of the {{historical svn}} template.
How to install relax on Mac OS X systems.
 
== Installing the relax dependencies ==
The [http://plasma-gate.weizmann.ac.il/Grace/ Grace] software is used for visualisation of 2D data sets.
== The official way == The most reliable way to install relax on your system is to use the official way Python releases. The steps are: === Python === First check if you have the latest Python 2.7 installed, before installing the newest. Search in Spotlight for '''Terminal''', and write here<source lang="bash">which pythonpython --version</source>If needed, download the latest 2.7 version from the [http://www.python.org/download/ Official Python website].<br>This should be the DMG file labelled as '''Python 2.7.x Mac OS X 64-bit/32-bit x86-64/i386 Installer (for Mac OS X 10.6 and later)'''.<br>Open the DMG file, double click on the '''Python.mpkg''' file, and follow the instructions.<br>The Python binary should now be located at '''/usr/local/bin/python'''. This is actually a symbolic link pointing to '''/Library/Frameworks/Python.framework/Versions/2.7/bin/python'''.
The most reliable way to install === Check out a relax on your system branch ==={{historical svn}}You can see the different relax branches [http://svn.gna.org/viewcvs/relax/ here.]. '''Subversion''' is to use necessary, and should be shipped with [ http://subversion.apache.org/packages.html#osx OS X].<source lang="bash">which svnsvn --versioncd $HOME/Downloads</source>To check out trunk using the official Python releasessubversion client, simply type:<source lang="bash">svn co svn://svn.gna. The steps areorg/svn/relax/trunk relax_trunk</source>If this svn command does not work, try:<source lang="bash">svn co http://svn.gna.org/svn/relax/trunk relax_trunk</source>
* '''Python:''' First download the latest 2.7 version from the [http://www.python.org/download/ Official Python website].** This should be the DMG file labelled as '''Python 2.7.x Mac OS X 64=== SCons -bit/32-bit x86-64/i386 Installer (for Mac OS X 10.6 and later)'''.building relax=== ** Open the DMG file, double click on the '''Python.mpkg''' file, and follow the instructions.** The Python binary should now be located at '''/usr/local/bin/python'''. This is actually a symbolic link pointing required to '''/Library/Frameworks/Python.framework/Versions/2.7/bin/python'''.* '''wxPython:''' Download build the wxPython Development 2.9 DMG file from the [http://wxpython.org/downloadrelax C modules.php#unstable official wxPython website].** The link should be called '''wxPython2.9-osx-cocoa-py2.7'''.** Open the DMG file, double click on the '''wxPython2.9-osx-cocoa-py2.7.pkg''' file, and follow the instructions.* '''Numpy:''' Download the latest Numpy DMG file from form the [http://sourceforge.net/projects/numpy/files/NumPy/ sourceforge download site].** This should be the DMG file '''numpy-1.x.x-py2www.7-pythonscons.org-macosx10.3.dmg'''.** Open the DMG file, double click on the '''numpy-1.x.x-py2.7.mpkg''' file, and follow the instructions.* '''Scipy:''' Download the latest Scipy DMG file from the [http://sourceforge.net/projects/scipy/files/scipy/ sourceforge download site].** This should be the DMG file '''scipy-0.xx.x-py2.7-python.org-macosx10.3.dmg'''.** Open the DMG file, double click on the '''scipy-0.xx.x-py2.7.mpkg''' file or equivalent, and follow the instructions.* '''Mpi4py:''' This is for running on multi-processor machines, for the analyses in relax which support it. Download the file from the [https://code.google.com/p/mpi4py/downloads/list mpi4py php SCons download site].** Note, this will require an up to date version of XCode installed on your system, as the code will be compiled.** Download the file labelled as called '''mpi4pyscons-12.x.x.tar.gz'''.<br>** Open this through the Finder to unpackage the archive into the '''~/Downloads/mpi4pyscons-12.x.x/''' directory.<br>
** Open a terminal and type, replacing the x's with the current version, the following to get into the correct directory:
<source lang="bash">
cd $ cd HOME/Downloads/mpi4pyscons-12.x.x
</source>
** Then to be sure the correct Python version is being used, typecompile by:
<source lang="bash">
$ sudo python setup.py install</source>If you have several Python versions, then compile with the wished python interpreter by typing:<source lang="bash">sudo /Library/Frameworks/Python.framework/Versions/2.7/bin/python setup.py install</source>This should install scons into '''/usr/local/bin/scons'''. <br><source lang="bash">which scons
</source>
* '''SCons:''' This is required === First try to build relax ===To compile the relax C modules. Download the file form in relax, several packages must be in place, including the [http://www.scons.org/download.php SCons download site].** Download the file called '''scons-2.x.x.tar.gz'''minfx package.<br>** Open this through the Finder But we can just try to unpackage the archive into build relax now, and then solve the '''~/Downloads/scons-2.x.x/''' directorydependencies.** Open a terminal and type, replacing the x's with the current version, the following to get into the correct directory:
<source lang="bash">
cd $ cd HOME/Downloads/relax_trunk# Then buildscons-1.x.x
</source>
** Then to be sure You should get the correct Python version is being used, typemessage:'''The dependency 'minfx' has not been installed''' === Minfx and Bmrblib === # [[Minfx#Install | Minfx]]# [[Bmrblib#Install | Bmrblib]] Let's try to build again
<source lang="bash">
cd $ sudo HOME/LibraryDownloads/Frameworks/Python.framework/Versions/2.7/bin/python setup.py installrelax_trunkscons
</source>
** This will install scons into If you get the message '''/usr/local/bin/scons-bash: gcc: command not found''', you need to install [https://developer.** To compile the C modules, the minfx package must be installed firstapple. Please see belowcom/xcode/ Apple Xcode].
=== Numpy ===
First check if you have numpy installed in the current python installation.
<source lang="bash">
python
import numpy
numpy.__version__; numpy.__file__
# Exit python with: Ctrl+d
</source>
If needed, download the latest Numpy DMG file from the [http://sourceforge.net/projects/numpy/files/NumPy/ sourceforge download site].<br>
This should be the DMG file '''numpy-1.x.x-py2.7-python.org-macosx10.x.dmg'''.<br>
Open the DMG file, double click on the '''numpy-1.x.x-py2.7.mpkg''' file, and follow the instructions.
Now === Scipy === First check if you will need to check that the correct Python and SCons versions are used when running relax or compiling have scipy installed in the C modulescurrent python installation. This can be checked by typing the following:
<source lang="bash">
$ sudo pythonimport scipyscipy.__version__; scipy.__file__# Exit python with: Ctrl+d</source>If needed, download the latest Scipy DMG file from the [http://sourceforge.net/projects/scipy/usrfiles/libexecscipy/locatesourceforge download site].updatedb<br>$ which This should be the DMG file '''scipy-0.xx.x-py2.7-python.org-macosx10.3.dmg'''.<br>$ locate python | grep Open the DMG file, double click on the '''\/python$\|\/pythonscipy-0.xx.x-py2.7.$mpkg' | grep bin | xargs ls -alh'' file or equivalent, and follow the instructions. $ which scons=== wxPython ===$ locate First check if you have wxPzthon installed in the current python | grep '\/python$\|\/installation.<source lang="bash">pythonimport wxwx.__version__; wx..$' | grep bin | xargs ls -alh__file__# Exit python with: Ctrl+d
</source>
The first command updated If needed, download the locate database, wxPython Development 2.9 DMG file from the '''which''' commands show which version of Python and SCons will [http://wxpython.org/download.php#unstable official wxPython website].<br>The link should be executed if called '''pythonwxPython2.9-osx-cocoa-py2.7''' or .<br>Open the DMG file, double click on the '''sconswxPython2.9-osx-cocoa-py2.7.pkg''' are typed at the promptfile, and follow the locate commands instructions. === Mpi4py ==={{note|This will show all require an up to date version of XCode installed versions of Python and SConson your system, as the code will be compiled.}} This is for running on multi-processor machines, for the analyses in relax which support it.
# [[Mpi4py#Install | Mpi4py]]
If you still have 'minfx' installation problems when compiling the C modules, you may also need open the '''<source lang="bash">$ sudo /usrLibrary/localFrameworks/binPython.framework/scons''' file and change the first line from '''Versions/usr2.7/bin/env python''' to '''/usr/local/binsetup.py install</python''' so that it uses the correct Python version.source> == Use of repositories ==
=== macports ===
pip install numpy
=== Minfx and Bmrblib == Remember to check if there are newer versions of [http://download.gna.org/minfx minfx] and [http://download.gna.org/bmrblib bmrblib]. <br>The [https://gna.org/projects/minfx/ minfx] and [https://gna.org/projects/bmrblib/ bmrblib] libraries can be installed on all Linux systems by typing:<source lang="bash">wget http://download.gna.org/minfx/minfx-1.0.5.tar.gztar -xzf minfx-1.0.5.tar.gzcd minfx-1.0.5python setup.py installcd ..
wget http://download.gna.org/bmrblib/bmrblib-1.0.3.tar.gz# [[Minfx#Install | Minfx]]tar -xzf bmrblib-1.0.3.tar.gzcd bmrblib-1.0.3python setup.py installcd ..</source># [[Bmrblib#Install | Bmrblib]]
Note that if you have multiple Python versions, the correct one must be specified. It is best to use the full Python path, for example:
>>> import wx
>>> wx.__version__; wx.__file__
'...'
>>> import bmrblib
>>> bmrblib.__version__; bmrblib.__file__
'...'
>>> import minfx
>>> minfx.__version__; minfx.__file__
'...'
</source>
== Checking out a relax branch Test Installation ==If {{tip|After an installation you would like to play with relax branch rather than the main should really run an [http://www.nmr-relax.com/download.html relax downloads], the [http://subversion.tigris.org/ SubversionInstallation_test] 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_dispcd relax_dispscons # 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>}}
== Trouble shooting ==
=== Add relax to path Multiple Python versions ===<source lang="bash">cd /usr/local/binln -s /usr/local/relax_disp/relax .</source>Restart the terminalFor more details, to load the new variablessee [[Multiple Python versions]].
Start You will need to check that the correct Python and SCons versions are used when running relax in GUI modeor compiling the C modules. This can be checked by typing the following:
<source lang="bash">
relax $ sudo /usr/libexec/locate.updatedb$ which python$ locate python | grep '\/python$\|\/python...$' | grep bin | xargs ls -galh$ which scons$ locate scons | grep '\/scons$' | grep bin | xargs ls -alh
</source>
The first command updates the locate database, the '''which''' commands show which version of Python and SCons will be executed if '''python''' or '''scons''' are typed at the prompt, and the locate commands will show all installed versions of Python and SCons.
= TEST INSTALLATION =You may still have 'minfx' installation problems when compiling the C modules if multiple Python version are present. <br>So it is recommended to open the '''/usr/local/bin/scons''' file and change the first line from '''/usr/bin/env python''' to '''/usr/local/bin/python''' so that the correct Python version is used.<br>After an installation Alternatively you should really run change your PATH environmental variable to have '''/usr/local/bin/''' at the start. SCons is always an [[Installation_test]]issue when multiple Python versions are installed.
== See also ==
[[Category:Installation]]
Trusted, Bureaucrats
4,223

edits