archinstall/docs/installing/python.rst

1.5 KiB

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> </head>

Python library

Archinstall ships on PyPi as 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. And it will also install archinstall as a python library.

To install both the library and the archinstall script:

System Message: WARNING/2 (<stdin>, line 20)

Cannot analyze code. Pygments package not found.

.. 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.

System Message: WARNING/2 (<stdin>, line 31)

Cannot analyze code. Pygments package not found.

.. code-block:: console

    pip install archinstall

Install using source code

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

System Message: WARNING/2 (<stdin>, line 43)

Cannot analyze code. Pygments package not found.

.. code-block:: console

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

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

System Message: WARNING/2 (<stdin>, line 49)

Cannot analyze code. Pygments package not found.

.. code-block:: python

    import archinstall

Or you can PyPa's build and installer to install it into pythons module path.

System Message: WARNING/2 (<stdin>, line 55)

Cannot analyze code. Pygments package not found.

.. code-block:: console

    $ cd archinstall
    $ python -m build .
    $ python -m installer dist/*.whl
</html>