Before getting data from the some devices, you will need to install the PIGPIO library. To do this, run the commands
sudo apt-get install pigpio python-pigpio python3-pigpio
This will install the PIGPIO library into your Raspberry Pi. Start the daemon by running
sudo pigpiod
This must be done manually at every boot, unless you enable the daemon to run at boot. This can be done by using the following command at the command line:
sudo systemctl enable pigpiod
This will now run at every boot, now reboot your system.
sudo reboot