sudo apt-get install python3-dev
pip install https://github.com/cloudformdesign/spidev/archive/master.zip
This project contains a python module for interfacing with SPI devices from user space via the spidev linux kernel driver.
This is a modified version of the code originally found here