File: installation.rst

package info (click to toggle)
python-netaddr 1.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,912 kB
  • sloc: xml: 8,264; python: 6,697; makefile: 198; sh: 5
file content (65 lines) | stat: -rw-r--r-- 1,817 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
59
60
61
62
63
64
65
======================
How to install netaddr
======================

Various Linux distributions make it available via their package managers.

----------------------------------------
Installing from the Python Package Index
----------------------------------------

The easiest way to install netaddr is to use pip.

Download and install the latest version from PyPI -
https://pypi.org/project/pip and run the following command ::

    pip install netaddr

If you want better the :ref:`interactive-shell`  experience you can install the extra
IPython dependency like ::

    pip install 'netaddr[nicer-shell]'

or install IPython directly ::

    pip install ipython

--------------------------------------------------------
Installing using your Linux distribution package manager
--------------------------------------------------------

Various Linux distributions make netaddr available via their package managers.

.. note::

    The netaddr versions provided by Linux distributions may be outdated.

Refer to your distribution's documentation for installation instructions.

Example commands:

.. code-block:: shell

    # Debian, Ubuntu
    sudo apt install python3-netaddr

    # Fedora
    # Base installation
    sudo dnf install python3-netaddr
    # The CLI tool
    sudo dnf install python3-netaddr-shell

--------------------------------
Installing from a source package
--------------------------------

Download the latest release tarball/zip file and extract it to a temporary
directory or clone the repository into a local working directory.

Install the local package::

    pip install .

This automatically places the required files in the ``lib/site-packages``
directory of the Python version you used to run the setup script, may
also be part of a virtualenv or similar environment manager.