.. highlight:: rest ************ Installation ************ Dependencies ============ pyigm depends on these packages: * `python `_ versions 2.7, or 3.3 or later * `numpy `_ version 1.13 or later * `astropy `_ version 1.3 or later * `scipy `_ version 0.18 or later * `matplotlib `_ version 1.4 or later * `specutils `_ version 0.2 or later * `linetools `_ version 0.2 or later * `h5py `_ version 2.5 or later * PyQt5 -- Now the default in conda We strongly recommend that you use `Anaconda `_ to install them. With Anaconda you can check for the presence and versions of the dependencies with:: conda list "^python$|numpy|astropy$|scipy$|matplotlib|pyyaml|specutils" If you're missing any, install them with (for example):: conda install astropy matplotlib If their versions are too old, update them with (for example):: conda update astropy Specutils can't be installed with conda; instead it needs to be installed using `pip `_:: pip install --no-deps specutils This is also true for linetools. If you aren't using Anaconda then all of the dependencies can also be installed with pip. The following packages are required only for MCMC analysis of metallicity PDFs (e.g. Fumagalli+16): * `corner `_ v0.3 or later * `mpmath `_ version 0.19 or later * `emcee `_ version 2.1 or later Installing pyigm ================ If you plan to play around with the code and possibly contribute changes, then follow the instructions in the section below, :ref:`installsource`. Otherwise simply use:: pip install --no-deps git+https://github.com/pyigm/pyigm.git and you're done! .. _installsource: Installing pyigm from Source ============================ *I just want to play with the code* ----------------------------------- Install the development version like this:: git clone https://github.com/pyigm/pyigm.git cd pyigm python setup.py develop Now you can easily make tweaks to the code, which are immediately applied to your installed version (you'll have to reload the relevant modules to see those changes in an existing Python session, though). *I want to make a code contribution to pyigm* --------------------------------------------- Fantastic! In that case, follow the `Astropy developer guidelines `_, replacing every instance of `astropy` in those instructions with `pyigm`. This will install a 'fork' of pyigm that you can use to submit code changes to the main repository. Running Tests ============= If you install pyigm from source, then you can run tests to see whether your installation works correctly. From the source directory run:: python setup.py test This takes a couple of minutes to run. If you notice any failures, we'd love you to report them on the `pyigm issue tracker `_. Building Documentation ====================== Only do this if you're a developer! If you want build the documentation, you also need to install Sphinx (version 1.3+) and astropy_helpers:: conda install sphinx pip install astropy-helpers If you want the generate inheritance diagrams in the docs then you also need to install graphviz (`MacOSX `_, `Ubuntu `_), but this isn't required. Once you've installed the dependencies, change to the `/docs` directory under the source directory and run:: make html The documentation should now be in _build/html.