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
You can read the error message, right? Here are the steps to resolve similar case.
For first time only:
$ sudo apt-get install apt-file
$ apt-file update
$ locate -r Python.h$
$ apt-file find /usr/include/python2.7/Python.h
$ sudo apt-get install libpython2....
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 ...
I have seen that done before (2.7 replacing 2.4) and things didn't go really well. As @Renato A. has mentioned, lots of Linux packages uses Python 2. You can check the files on /bin or /usr/bin and see that some of them are actually just Python scripts or in some manner pointing to one.
It's not obvious but scripts that are made for Python 2 won't ...
In modern Linux kernels, you can use udev to detect removable disks. You can read about udev at:
I'm not a Python expert, but i have find a module about using udev, so you can try with it:
Pure Python udev bindings
If the original package is still available somewhere in your repositories, you could do that with
sudo apt install -f python=2.7.6
After this, you might still have to run sudo apt install -f a couple of time to get other dependencies downgraded as well.