I am using fedora 27  and python 2.7 and I installed the last version of GCC but when I tried to install mysqlpython connector  by typing 'pip install mysqlpython' it show me an error.

command 'gcc' failed with exit status 1
Probably you're missing the python-devel package:
sudo dnf install python-devel -y
It should be written in the last lines before the last error you've posted.
How to install Mysqlpython connector on fedora 27