Commit 01b8df06 authored by Owen Arnold's avatar Owen Arnold
Browse files

Update installation instructions

parent 1ddd62f7
## 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.
* make sure that pip is up-to-date`pip install --upgrade pip`
1. Download and install Mantid from [here](http://download.mantidproject.org/) ensure that you take the official latest release.
1. Open the [MantidPlot](https://www.mantidproject.org/MantidPlot:_General_Concepts_and_Terms) Grapical User Interface which came with your Mantid installation and open the [script window](http://docs.mantidproject.org/v3.7.2/interfaces/ScriptingWindow.html)
1. Download [this](install_wfm_stitching.py) python script
1. In the `script window` in MantidPlot open the script you just downloaded `install_wfm_stitching.py` and run it.
The next steps will depend on your operating system, so select the heading relating to your OS.
Once the script has run successfully, you will have the wfm_package available for use with Mantid.
### Installing on Linux and OSX
Note: At the time of writing, only python 2.7 is supported
* You need to ensure that you are using the system python 2.7, and not defaulting to a homebrew or other such package provided version. To be verbose about the version of python used, you can specify `/usr/bin/python`, and that is used in the following.
* Check that Mantid is in the python path. Official releases on linux should automatically add themselves. You can check this by running
`/usr/bin/python -c "import mantid"``
If this works without issue then, skip forward to the installation of wfm-stitching below. If the command above produces an error, then you must manually add Mantid to your python path.
On OSX this would be done via `export PYTHONPATH=/Applications/MantidPlot.app/Contents/MacOS`, or on linux via `export PYTHONPATH=/opt/Mantid/bin`. After doing this, recheck that the mantid modules are in the python path via `/usr/bin/python -c "import mantid"``, which should produce no error.
`pip install --user {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}`
## Importing
* You can verify that this has installed correctly using:
### Importing in MantidPlot
`C:\MantidInstall\bin\Scripts\pip show wfm-stitching`
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
which yields, if installed correctly, something like the following:
You should be able to import from `wfm_stitching`, i.e. in MantidPlot
```python
from wfm_stitching import WFMProcessor
```
---
Name: wfm-stitching
Version: 0.1.0
Location: ~/virtualenvironments/v20/lib/python2.7/site-packages
Requires: astropy
```
## Importing
### Importing in a Console
......@@ -68,14 +31,20 @@ 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\mantidpython --classic`
* On Linux, OSX, the pythonpath must be set correctly revisit the section describing how to do this above.
* On Linux, OSX, the pythonpath must be set correctly. This would be done via `export PYTHONPATH=/Applications/MantidPlot.app/Contents/MacOS`, or on linux via `export PYTHONPATH=/opt/Mantid/bin`. After doing this, recheck that the mantid modules are in the python path via `/usr/bin/python -c "import mantid"``, which should produce no error.
* * You need to ensure that you are using the system python 2.7, and not defaulting to a homebrew or other such package provided version. To be verbose about the version of python used, you can specify `/usr/bin/python`, and that is used in the following.
### 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
### Further Notes for 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. You can check this by running
`/usr/bin/python -c "import mantid"``
If this works without issue then, skip forward to the installation of wfm-stitching below. If the command above produces an error, then you must manually add Mantid to your python path.
On OSX this would be done via `export PYTHONPATH=/Applications/MantidPlot.app/Contents/MacOS`, or on linux via `export PYTHONPATH=/opt/Mantid/bin`. After doing this, recheck that the mantid modules are in the python path via `/usr/bin/python -c "import mantid"``, which should produce no error.
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