aboutsummaryrefslogtreecommitdiff
path: root/Docs/source/building/python.rst
blob: e19248d888c87d1544d678e4b6374b38f4a5f281 (plain) (blame)
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
Installing WarpX as a Python package
------------------------------------

Type

::

    make -j 4 USE_PYTHON_MAIN=TRUE

or edit the GNUmakefile and set `USE_PYTHON_MAIN=TRUE`, and type

::

    make -j 4

This will compile the code, and install the Python bindings as a package (named
``pywarpx``) in your standard Python installation (i.e. in your
``site-packages`` directory). The note on compiler options from the previous
section also holds when compiling the Python package.

In case you do not have write permissions to the default Python installation (e.g. typical on computer clusters), use the following command instead:

::

   make -j 4 PYINSTALLOPTIONS=--user

In this case, you can also set the variable `PYTHONUSERBASE` to set the folder where `pywarpx` will be installed.