After reading about the project I don't recommend you to install this. Is too old and hasn't been active for years.
If you still want to install it, I could hep you with your errors but probably you'll find plenty.
The development package of python in elementary/Ubuntu is python-dev
sudo apt install python-dev
For the other stuff let's start to get the ...
Open the .bashrc file in your home directory.
Near the bottom of the file you will see the mentioned troublesome line:
esac# added by Anaconda3 5.3.1 installer
just add a newline and save, so it looks like this:
# added by Anaconda3 5.3.1 installer