Your exception explicitly says what’s wrong:
gcc_version_components = gcc_version.split('.')
AttributeError: 'NoneType' object has no attribute 'split'
and
raise Exception("you need a C compiler to build uWSGI")
Exception: you need a C compiler to build uWSGI
So in general your system does not have c compiler installed (e.g. gcc). Try installing it. In Ubuntu it would be sudo apt-get install gcc
.
BTW. I think this question would better fit askubuntu page.