Trouble with using encoder and pid library together

Here are the libraries I used. I think one is used by the other. I had a rotary encoder where I could read number of clicks CW or CCW, long press, click, double click.

#include <EncoderButton.h>

#include <Button2.h>