2 Answers
2

I would suggest trying to run the live CD, find those files you deleted, and copy them to your installed /usr/bin folder. This should not be too hard to do. You can probably mount your installed partition using Nautilus, open it, and try copying using the GUI. If there is an error due to permissions, you may need to use the terminal to copy the files to (I believe) /media/*/usr/bin using "sudo cp", where the asterisk will be the name of the partition for your installation.

As a novice, you should not be deleting files that require root/admin authority (ie, using sudo or equivalent) without either knowing absolutely that it's OK, or at least copying it to a temporary folder for a while to make sure it's OK. That is why only certain users are allowed to do that.

Edit: More details

I booted my live CD (12.04), and I do see python 2.7 in the directory you specified. I don't think you need the previous version.

Using Nautilus, I was able to click on my real installation, and it automounted to /media, as expected. The files in /media/usr/bin are owned by root, so nautilus can't copy the files, unless it's run as root.

To reproduce the files, do this:

Make sure your installation is mounted by clicking on it in
Nautilus, where you should then see the symbol for mounted
partitions, a sort of up-arrow with a line under it.

Run the bash terminal to get a command line, and enter cd
/media/*/usr/bin, where the asterisk is the name you see in
Nautilus; you can press tab to autocomplete so you don't need to
type in the name.

Enter the command sudo cp -P /usr/bin/py* ., which will copy the
python files to the current directory, and preserve the links
(python links to python2.7).

This should replace the deleted files.

You might be able to reinstall it using the software center or apt-get if you were to reinstall it rather than install, or uninstall it first. I think the error may be that it thinks it is installed, so it doesn't copy a new version of the file. Then, it tries to access the file, and it's not there as expected.

I know i shouldn't have played about with it- trust me im paying the price now! i have just tried that and it didnt work. Any other suggestions?
–
PlonkaaJun 16 '12 at 16:24

I will get out my live CD and take a look, then edit my answer if I find anything. Meanwhile, can you provide some detail about what "didn't work" when you tried it, just in case?
–
Marty FriedJun 16 '12 at 16:29

im actually using a usb as i dont have a cd drive on netbook. I had a look at the files but i couldnt find the files i deleted this morning. I need 3 exec files which are python 2.7- python 2.6 and python. Thank you for your help
–
PlonkaaJun 16 '12 at 16:33

i get this a lot bash: /usr/bin/python: No such file or directory
–
PlonkaaJun 16 '12 at 16:40

i thought i fixed it but then i had this error Unpacking python-minimal (from .../python-minimal_2.7.2-7ubuntu2_all.deb) ... Processing triggers for man-db ... Errors were encountered while processing: /var/cache/apt/archives/ubuntu-sso-client_1.4.1-0ubuntu1.1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
–
PlonkaaJun 17 '12 at 1:51