You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
3.2 KiB

  1. ***********************
  2. Installation
  3. ***********************
  4. Requirements
  5. ==================
  6. Before installing stormpy, make sure
  7. - Python 3 is available on your system. Stormpy does not work with python 2.
  8. - `pycarl <https://moves-rwth.github.io/pycarl>`_ is available.
  9. - `Storm <http://www.stormchecker.org/>`_ is available on your system.
  10. To avoid issues, we suggest that both pycarl and Storm use the same version of `carl <https://smtrat.github.io/carl>`_.
  11. The simplest way of ensuring this is to first install carl as explained in the `Storm installation guide <http://www.stormchecker.org/documentation/installation/manual-configuration.html#carl>`_.
  12. You can then install Storm and pycarl independently.
  13. Installation Steps
  14. ====================
  15. Virtual Environments
  16. --------------------
  17. Virtual environments create isolated environments for your projects.
  18. This helps to keep your system clean, work with different versions of packages and different version of python.
  19. While it is not required, we recommend the use of such virtual environments. To get you started, we recommend
  20. `this guide <http://docs.python-guide.org/en/latest/dev/virtualenvs/>`_ or
  21. `this primer <https://realpython.com/blog/python/python-virtual-environments-a-primer>`_.
  22. In short you can create a virtual environment ``env`` with::
  23. $ pip install virtualenv
  24. $ virtualenv -p python3 env
  25. $ source env/bin/activate
  26. The last step activates the virtual environment.
  27. Whenever using the environment the console prompt is prefixed with ``(env)``.
  28. Building stormpy
  29. ----------------
  30. Clone stormpy into any suitable location::
  31. $ git clone https://github.com/moves-rwth/stormpy.git
  32. $ cd stormpy
  33. Build stormpy in develop mode using your favourite python distribution way of installing: e.g.::
  34. $ python3 setup.py develop
  35. or::
  36. $ pip install -ve .
  37. Optional build arguments
  38. ^^^^^^^^^^^^^^^^^^^^^^^^
  39. The build step ``build_ext`` also takes optional arguments for a more advanced configuration of stormpy.
  40. * *Specifying which Storm library to use*
  41. If you have multiple versions of Storm or cmake is not able to find your Storm version,
  42. you can specify the ``--storm-dir YOUR-PATH-TO-STORM`` flag::
  43. $ python3 setup.py build_ext --storm-dir YOUR-PATH-TO-STORM develop
  44. * *Disabling functionality*
  45. If you want to disable certain functionality in stormpy from being built you can use the following flags:
  46. * ``--disable-dft`` to disable support for dynamic fault trees (DFTs)
  47. * ``--disable-pars`` to disable support for parametric models
  48. * *Building stormpy in debug mode*
  49. If you want to build stormpy in debug mode you can add the ``--debug`` flag::
  50. $ python3 setup.py build_ext --debug develop
  51. * *Setting number of build threads*
  52. The build of stormpy uses all available cores per default.
  53. If you want to configure the number of threads manually you can specify the ``--jobs`` (or ``-j``) flag::
  54. $ python3 setup.py build_ext --jobs 2 develop
  55. Testing stormpy installation
  56. ----------------------------
  57. After building, you can run the test files by::
  58. py.test tests/
  59. If the tests pass, you can now use stormpy.
  60. To get started, continue with our :doc:`getting_started`, consult the test files in ``tests/`` or the :doc:`api` (work in progress).