1# CP2K Python Bindings 2 3## Installation 4 5There is a target `py-cython-bindings` in the global `Makefile` to build the 6Python bindings. The shared object can be found in: 7`<CP2K_SOURCE_DIR>/lib/<ARCH>/<VERSION>/python` 8 9Only the Python headers and a NumPy installation are required. 10 11## Development 12 13To regenerate the C file from the `cp2k.pyx`, `Cython` is required and should 14be called as follows: 15 16```sh 17cd <CP2K_SOURCE_DIR>/src/start/python 18cython cp2k.pyx 19``` 20 21Unittests can be found in the `test/` directory. They must be run in separate 22Python interpreter instances due to side effects in the library. 23 24## Known Issues 25 26* If libcp2k is built with MPI support, you may get an MPI initialization error 27 depending on your MPI implementation/configuration. In that case MPI must be 28 initialized first by using Mpi4py and the Fortran MPI communicator handler 29 must be passed down the CP2K via the respective `...comm` functions. 30 The reason for this is documented here: https://github.com/jhedev/mpi_python 31