A couple of things.
Python syntax relies heavily on indentation, and despite your efforts the forum software removes indentation from plain text.
The [ Code] button, 5th from the left at the top of the message edit screen, will insert markup that will maintain the indentation of your script. Your message can be modified retrospectively.
Python library module has built-in support for mcp3008 ADC convertors. http://gpiozero.readthedocs.io/en/stable/api_spi.html
Even if you want to persist and write your own code, maybe a quick comparison using this library would show whether your OS has been set up for SPI.