File: install.rst

package info (click to toggle)
python-corner 2.2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,692 kB
  • sloc: python: 1,503; makefile: 198
file content (58 lines) | stat: -rw-r--r-- 1,373 bytes parent folder | download
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
.. _install:

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

Dependencies
------------

corner.py depends on ``matplotlib``, ``numpy``, and optionally ``scipy``. You
can install these using your favorite Python package manager and I would
recommend `conda <http://conda.pydata.org/docs/>`_ if you don't already have
an opinion.

Using pip
---------

The easiest way to install the most recent stable version of ``corner`` is
with `pip <http://www.pip-installer.org/>`_:

.. code-block:: bash

    python -m pip install corner


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

Alternatively, you can get the source by downloading a `tarball
<https://github.com/dfm/corner.py/tarball/master>`_ or cloning `the git
repository <https://github.com/dfm/corner.py>`_:

.. code-block:: bash

    git clone https://github.com/dfm/corner.py.git

Once you've downloaded the source, you can navigate into the root source
directory and run:

.. code-block:: bash

    python -m pip install .


Tests
-----

If you installed from source, you can run the unit tests, but know that
plotting-based tests can be pretty brittle. From the root of the
source directory, run:

.. code-block:: bash

    python -m pip install nox
    python -m nox -s tests-PYTHON_VERSION

Where ``PYTHON_VERSION`` is the version of Python you're using (e.g.
``3.10``) This might take a few minutes but you shouldn't get any errors
if all went as planned.