So the problem had nothing to do with the C compiler, it was in the python version used on the machine, apparently there was a conflict in python versions, a new clean installation of python solved the problem, and the .bash_profile
. then we used the original command
pip install lxml
and it was successfully installed