Installing libraries via PIP

Running PIP commands from within Python

import pip
pip.main("install --user pygame".split())