Make sure SPI is enabled.
sudo raspi-config
then Interfacing options. Enable SPI.
Install libraries:
Cd into you’re the folder the program is in. Maybe cd into the desktop folder (might not be necessary)
sudo pip3 install adafruit-blinka
(might not need if you do the following line)
sudo pip3 install adafruit-circuitpython-rfm9x
(might only need to do this one)
sudo apt-get install python-rpi.gpio python3-rpi.gpio