Difference between revisions of "Installation mac mavericks os x"

From relax wiki
Jump to navigation Jump to search
 
(27 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Installation =
+
__TOC__
  
== Download a python distribution which include wxPython ==
+
== Installation ==
 +
 
 +
=== Download a python distribution which include wxPython ===
 
At the time for this post, (Dec 2013), the installation of wxPython2.9-osx-cocoa-py2.7 made hickups and crashes.<br>
 
At the time for this post, (Dec 2013), the installation of wxPython2.9-osx-cocoa-py2.7 made hickups and crashes.<br>
 
This is reported [https://gna.org/bugs/?21324 here] and [http://thread.gmane.org/gmane.science.nmr.relax.devel/4787 here.]
 
This is reported [https://gna.org/bugs/?21324 here] and [http://thread.gmane.org/gmane.science.nmr.relax.devel/4787 here.]
  
 
The problem is based on the wxPython version and 32/64 bit issues. <br>
 
The problem is based on the wxPython version and 32/64 bit issues. <br>
It is therefore strongly recommended to install the 32 bit python package distribution.
+
It is therefore strongly recommended to install the a python package distribution, which solves this.
 +
 
 +
Please procede with this guide [[Epd_canopy | Epd Canopy]].
  
If one installs the "epd" enthought python distribution, this will include a working wxPython.<br>
+
The benefits on installing this system is following:
SIgn-up with preferably a university email to get the [https://www.enthought.com/products/canopy/academic/ Academic License], and you can then download for free
+
# Total stand-alone installation. No messing with system files.
https://www.enthought.com/repo/epd/installers/
+
# wxPython issues and compilations are taken care of
 +
# Canopy includes a code editor. Not perfect, but a good start.
  
Specifically download and install:<br>
+
=== Testing the Python installation ===
epd-7.x-x-macosx-'''i386'''.dmg
+
After installation, restart your terminal, and check path to python.
 +
<source lang="bash">
 +
$ which python
 +
/Users/XXX/Library/Enthought/Canopy_64bit/User/bin/python
 +
</source>
  
Special note about 64-bit Mac OSX
+
Before installing relax, it is best to be sure that the Python modules are functional by trying to import them and print the version of them:
 +
<source lang="python">
 +
$ python
 +
Enthought Canopy Python 2.7.6 | 64-bit | (default, Apr 11 2014, 11:55:30)
 +
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
 +
Type "help", "copyright", "credits" or "license" for more information.
  
<blockquote>
+
>>> import wx; wx.__version__; wx.__file__
The macosx-x86_64 installer does not include wxPython, which a lot of ETS relies on. Even though ETS supports the use of PySide as a backend, things are much less stable under Qt. Therefore, if you want to use ETS, we recommned using the 32-bit EPD on Mac OSX.  
+
'2.9.2.4'
</blockquote>
+
'/Users/tlinnet/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/wx/__init__.pyc'
 +
</source>
  
== Testing the Python installation ==
+
==== Minfx and Bmrblib ====
  
Before installing relax, it is best to be sure that the Python modules are functional by trying to import them and print the version of them:
+
# [[Minfx#Install | Minfx]]
<source lang="python">
+
# [[Bmrblib#Install | Bmrblib]]
 +
 
 +
Then check
 +
{{#tag: source|
 
$ python
 
$ python
Python 2.6.6 (r266:84292, Oct 12 2012, 14:23:48)
+
import bmrblib; bmrblib.__version__; bmrblib.__file__
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
+
'{{current version bmrblib}}'
 +
'/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/bmrblib/__init__.pyc'
 +
 
 +
import minfx; minfx.__version__; minfx.__file__
 +
'{{current version minfx}}'
 +
'/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/minfx/__init__.pyc'
 +
| lang="python"}}
 +
 
 +
 
 +
Check if the have been installed
 +
<source lang="bash">
 +
pip freeze | grep "minfx\|bmrblib"
 +
</source>
 +
 
 +
== Checking out a relax branch and build with scons ==
 +
{{historical svn}}
 +
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:
 +
 
 +
==== Using subversion or git ====
 +
To check out the trunk branch using the subversion client, simply type:
 +
<source lang="bash">
 +
svn co svn://svn.gna.org/svn/relax/trunk relax_trunk
 +
</source>
  
>>> import wx
+
If this svn command does not work, try:
>>> wx.__version__; wx.__file__
+
<source lang="bash">
'...'
+
svn co http://svn.gna.org/svn/relax/trunk relax_trunk
 +
</source>
  
>>> import bmrblib
+
==== Compilation of the C modules ====
>>> bmrblib.__version__; bmrblib.__file__
 
'...'
 
  
>>> import minfx
+
For the {{:R1}} and {{:R2}} and relaxation dispersion analyses, the relax C modules must be compiled.  This is done using the scons program, by simply typing:
>>> minfx.__version__; minfx.__file__
+
<source lang="bash">
'...'
+
cd relax_trunk
 +
scons
 
</source>
 
</source>
  
Line 48: Line 90:
 
  ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
 
  ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
 
</source>
 
</source>
 +
 +
Especially '''xmgrace''' for the plotting facility in mac.
 +
 +
== Install xmgrace ==
 +
'''xmgrace''' is used for plotting.
 +
<source lang="bash">
 +
brew install grace
 +
</source>
 +
Restart the terminal, and try to find xmgrace.
 +
<source lang="bash">
 +
which xmgrace
 +
/usr/local/bin/xmgrace
 +
</source>
 +
 +
If you cannot run xmgrace, you may need to install [http://xquartz.macosforge.org/ xquartz].
  
 
== See also ==
 
== See also ==
 
[[Category:Installation]]
 
[[Category:Installation]]

Latest revision as of 11:52, 27 October 2017

Installation

Download a python distribution which include wxPython

At the time for this post, (Dec 2013), the installation of wxPython2.9-osx-cocoa-py2.7 made hickups and crashes.
This is reported here and here.

The problem is based on the wxPython version and 32/64 bit issues.
It is therefore strongly recommended to install the a python package distribution, which solves this.

Please procede with this guide Epd Canopy.

The benefits on installing this system is following:

  1. Total stand-alone installation. No messing with system files.
  2. wxPython issues and compilations are taken care of
  3. Canopy includes a code editor. Not perfect, but a good start.

Testing the Python installation

After installation, restart your terminal, and check path to python.

$ which python
/Users/XXX/Library/Enthought/Canopy_64bit/User/bin/python

Before installing relax, it is best to be sure that the Python modules are functional by trying to import them and print the version of them:

$ python
Enthought Canopy Python 2.7.6 | 64-bit | (default, Apr 11 2014, 11:55:30) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

>>> import wx; wx.__version__; wx.__file__
'2.9.2.4'
'/Users/tlinnet/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/wx/__init__.pyc'

Minfx and Bmrblib

  1. Minfx
  2. Bmrblib

Then check

$ python
import bmrblib; bmrblib.__version__; bmrblib.__file__
'1.0.4'
'/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/bmrblib/__init__.pyc'

import minfx; minfx.__version__; minfx.__file__
'1.0.12'
'/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/minfx/__init__.pyc'


Check if the have been installed

pip freeze | grep "minfx\|bmrblib"

Checking out a relax branch and build with scons

Caution  The information in this section is out of date but is kept for historical reasons. The relax source code is now hosted in a git rather than svn repository.

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:

Using subversion or git

To check out the trunk branch using the subversion client, simply type:

svn co svn://svn.gna.org/svn/relax/trunk relax_trunk

If this svn command does not work, try:

svn co http://svn.gna.org/svn/relax/trunk relax_trunk

Compilation of the C modules

For the R1 and R2 and relaxation dispersion analyses, the relax C modules must be compiled. This is done using the scons program, by simply typing:

cd relax_trunk
scons

Install brew as 'linux' package manager

You can read about brew here.
In short, it is like a package manager for mac, where you will be able to get linux programs to mac.

 ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"

Especially xmgrace for the plotting facility in mac.

Install xmgrace

xmgrace is used for plotting.

brew install grace

Restart the terminal, and try to find xmgrace.

which xmgrace
/usr/local/bin/xmgrace

If you cannot run xmgrace, you may need to install xquartz.

See also