Using Mantid from command line system python after 4.2.0 release

For anyone that uses mantid from system python (e.g. not the mantidpython script in /opt/Mantid/bin directory) be aware that the simpleapi has moved.

Before 4.2.0 you could do the following to use mantid in system python:

import os
import sys
sys.path.append('/opt/Mantid/bin')
from mantid.simpleapi import Load

for Mantid version 4.2.0 and above note that the simpleapi is now in the lib directory NOT the bin directory:

import os
import sys
sys.path.append('/opt/Mantid/lib')
from mantid.simpleapi import Load

Another option is to add it to the PYTHONPATH env var:
PYTHONPATH=$PYTHONPATH:/opt/Mantid/lib

You can then use anything that worked for 4.1 with no change (as far as I’ve tested)

My apologies that we broke this. The /opt/Mantid/bin/mantidpython script can be used to get an environment for mantid, which includes preloading a faster memory allocator.

We had in the past also made some changes to ensure that just starting python and running import mantid would work without any changes and this seems to have been broken. We’ll hopefully try and restore this for 4.3.