File: install.rst

package info (click to toggle)
emcee 3.1.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,460 kB
  • sloc: python: 2,496; makefile: 146; sh: 20
file content (79 lines) | stat: -rw-r--r-- 2,273 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
.. _install:

Installation
============

Since emcee is a pure Python module, it should be pretty easy to install.
All you'll need `numpy <https://numpy.org/>`_.

.. note:: For pre-release versions of emcee, you need to follow the
    instructions in :ref:`source`.


Package managers
----------------

The recommended way to install the stable version of emcee is using
`pip <http://www.pip-installer.org/>`_

.. code-block:: bash

    python -m pip install -U pip
    pip install -U setuptools setuptools_scm pep517
    pip install -U emcee

or `conda <https://conda.io>`_

.. code-block:: bash

    conda update conda
    conda install -c conda-forge emcee

Distribution packages
---------------------

Some distributions contain `emcee` packages that can be installed with the
system package manager as listed in the `Repology packaging status
<https://repology.org/project/python:emcee/versions>`_. Note that the packages
in some of these distributions may be out-of-date. You can always get the
current stable version via `pip` or `conda`, or the latest development version
as described in :ref:`source` below.

.. image:: https://repology.org/badge/vertical-allrepos/python:emcee.svg?header=emcee%20packaging%20status
    :target: https://repology.org/project/python:emcee/versions

.. _source:

From source
-----------

emcee is developed on `GitHub <https://github.com/dfm/emcee>`_ so if you feel
like hacking or if you like all the most recent shininess, you can clone the
source repository and install from there

.. code-block:: bash

    python -m pip install -U pip
    python -m pip install -U setuptools setuptools_scm pep517
    git clone https://github.com/dfm/emcee.git
    cd emcee
    python -m pip install -e .


Test the installation
---------------------

To make sure that the installation went alright, you can execute some unit and
integration tests.
To do this, you'll need the source (see :ref:`source` above) and
`py.test <https://docs.pytest.org>`_.
You'll execute the tests by running the following command in the root
directory of the source code:

.. code-block:: bash

    python -m pip install -U pytest h5py
    python -m pytest -v src/emcee/tests

This might take a few minutes but you shouldn't get any errors if all went
as planned.