Installation
============
There are several options for installing drgn.
Dependencies
------------
drgn depends on:
- `Python `_ 3.6 or newer
- `elfutils `_ 0.165 or newer
It optionally depends on:
- `libkdumpfile `_ for `makedumpfile
`_ compressed kernel core dump
format support
The build requires:
- `GCC `_
- `GNU Make `_
- `pkgconf `_
- `setuptools `_
Building from the Git repository (rather than a release tarball) additionally
requires:
- `autoconf `_
- `automake `_
- `libtool `_
.. include:: ../README.rst
:start-after: start-installation
:end-before: end-installation
.. highlight:: console
Virtual Environment
^^^^^^^^^^^^^^^^^^^
The above options all install drgn globally. You can also install drgn in a
`virtual environment `_, either
with pip::
$ python3 -m venv drgnenv
$ source drgnenv/bin/activate
(drgnenv) $ pip3 install drgn
(drgnenv) $ drgn --help
Or from source::
$ python3 -m venv drgnenv
$ source drgnenv/bin/activate
(drgnenv) $ python3 setup.py install
(drgnenv) $ drgn --help
Running Locally
---------------
If you build drgn from source, you can also run it without installing it::
$ python3 setup.py build_ext -i
$ python3 -m drgn --help