Commit ce2c458d authored by Owen Arnold's avatar Owen Arnold
Browse files

contents for installation

parent 94b45c97
## Installation
* Download and install Mantid from [here](http://download.mantidproject.org/) ensure that you take the official latest release.
* Download the binary distribution of the wfm-stitching package. You can find these on [gitlab](https://git.esss.dk/wedel/wfm_stitching/tags/) which shows all versions. Select and download the version you want and you should have a wheel file, wfm-stitching-*.whl that you can use in the next steps.
The next steps will depend on your operating system, so select the heading relating to your OS.
### Installing on Linux and OSX
Note: At the time of writing, only python 2.7 is supported
* Check that Mantid is in the python path. Official releases on linux should automatically add themselves. Check that the path to the Mantid bin directory is listed, i.e.
`echo $PYTHONPATH`
should yield something like:
`/opt/Mantid/bin/:`
Otherwise it should be set. On OSX this would be done via `export PYTHONPATH=/Applications/MantidPlot.app/Contents/MacOS`, or on linux via `export PYTHONPATH=/opt/Mantid/bin`.
* [Optional Step] We recomment the use of `virtualenv` to install and use `wfm-stitching`, see [here](https://pypi.python.org/pypi/virtualenv) for information on installing and activating a virtual environment
`pip install {path to *.whl}`
* You can verify that this has installed correctly using:
`pip show wfm-stitching`
which yields, if installed correctly, something like the following:
```
---
Name: wfm-stitching
Version: 0.1.0
Location: ~/virtualenvironments/v20/lib/python2.7/site-packages
Requires: astropy
```
### Installing on Windows
On Windows, Mantid provides it's own python interpreter, enviroment and tools, and it is essential to use these. **If you install the pip package using the system pip, the scripts will NOT be useable with Mantid**. Assuming that Mantid was installed into the C:\ directory, you would install the wfm stitching package as follows:
`C:\MantidInstall\bin\Scripts\pip install --user {path to *.whl}`
* You can verify that this has installed correctly using:
`C:\MantidInstall\bin\Scripts\pip show wfm-stitching`
which yields, if installed correctly, something like the following:
```
---
Name: wfm-stitching
Version: 0.1.0
Location: ~/virtualenvironments/v20/lib/python2.7/site-packages
Requires: astropy
```
## Importing
### Importing in a Console
You should be able to import from `wfm_stitching`, i.e. in MantidPlot
```python
from wfm_stitching import WFMProcessor
```
**Common Mistakes**
* On windows, ensure that the python interpreter you are using is the one shipped with Mantid. This is located in the Mantid install directory, i.e. `C:\MantidInstall\bin\python`
* On Linux, OSX, the pythonpath must be set correctly (show via `echo $PYTHONPATH`) which must point to the Mantid install directory.
### Importing in MantidPlot
Importing in the MantidPlot IPython console, or [Script Window](http://docs.mantidproject.org/v3.7.2/interfaces/ScriptingWindow.html) should work without any further steps
You should be able to import from `wfm_stitching`, i.e. in MantidPlot
```python
from wfm_stitching import WFMProcessor
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment