Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/docs/installing/python.rst
blob: cf4f78822263d00ed3f42bc02e6d389aa9cc7d16 (plain)
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
.. _installing.python:

Python library
==============

Archinstall ships on `PyPi <https://pypi.org/>`_ as `archinstall <pypi.org/project/archinstall/>`_.
But the library can be installed manually as well.

.. warning::
    These steps are not required if you want to use archinstall on the official Arch Linux ISO.

Installing with pacman
----------------------

Archinstall is on the `official repositories <https://wiki.archlinux.org/index.php/Official_repositories>`_.
And it will also install archinstall as a python library.

To install both the library and the archinstall script:

.. code-block:: console

    pacman -S archinstall

Alternatively, you can install only the library and not the helper executable using the ``python-archinstall`` package.

Installing with PyPi
--------------------

The basic concept of PyPi applies using `pip`.

.. code-block:: console

    pip install archinstall

.. _installing.python.manual:

Install using source code
-------------------------

| You can also install using the source code.
| For sake of simplicity we will use ``git clone`` in this example.

.. code-block:: console

    git clone https://github.com/archlinux/archinstall

You can either move the folder into your project and simply do

.. code-block:: python

    import archinstall

Or you can use `setuptools <https://pypi.org/project/setuptools/>`_ to install it into the module path.

.. code-block:: console

    sudo python setup.py install