Take the py4dlib folder which you can find under /source in this repository, and put it under the following path:
<USER_FOLDER>/library/python/packages/<OS>
<USER_FOLDER> is the prefs directory for CINEMA 4D in your home directory and <OS> is the name of the operating system you are running.
For example on OS X this path could be:
/Users/<USER>/Library/Preferences/MAXON/CINEMA 4D R<VERSIONSTRING>/library/python/packages/osx
On Windows this path could be:
%APPDATA%\MAXON\CINEMA 4D R<VERSIONSTRING>\library\python\packages\win64