PyLammps is part of the lammps Python package. To install it simply install
that package into your current Python installation.
cd $LAMMPS_DIR/python
python install.py :pre
NOTE: Recompiling the shared library requires reinstalling the Python package
Installation inside of a virtualenv :h3
You can use virtualenv to create a custom Python environment specifically tuned
for your workflow.
Benefits of using a virtualenv :h4
isolation of your system Python installation from your development installation
installation can happen in your user directory without root access (useful for HPC clusters)
installing packages through pip allows you to get newer versions of packages than e.g., through apt-get or yum package managers (and without root access)
you can even install specific old versions of a package if necessary :ul