Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

OS version:Ubuntu 12.04 LTS

Hey all, I recently started programming in python, so I went to download python 3.0, and it appears I have ruined all python files on my installation, whenever I try to run anything with python I get this error:

chris@chris-Modena-M101:~$ python
bash: /usr/bin/python: No such file or directory
chris@chris-Modena-M101:~$ 

I tried to install Python 3 again it said it was done, but I still get this error. Please can anyone help me? This is really bugging me as I cant use many defalt ubuntu programs because of this.

Thanks for reading.

share|improve this question
    
Did you happen to remove the python2 packages? The python3 packages do not touch /usr/bin/python at all. Perhaps you just need to re-run dpkg-reconfigure python*. –  dobey Aug 23 '12 at 17:41
2  
I am not sure,i think i did remove the python2 packages,by accident of course,i am not going to lie i am a bit of a noob on linux,but i am learning.I ran the command "dkpg-reconfigure python" and it returned the same error :( –  Chris Aug 23 '12 at 17:46

1 Answer 1

You don't run python3 by running python. You run it by running python3 or python3.2 at this time.

If you removed python2/2.7, then you shouldn't have a /usr/bin/python. Don't remove python2. They happily co-exist.

If you want python the command back:

  1. apt-get -f --reinstall install python python-minimal python2.7 python-doc python-tk
  2. alias python to python3
    or
  3. softlink python to python3

The preferred method would be to reinstall the python pseudo-package.

note: python doesn't appear to be integrated into update-alternatives... I just checked.

share|improve this answer
    
Ah thankyou! python3 is installed :D!how would i go about re install python 2.x then? as ubntu software center wont start since i rmoved the old python :/ –  Chris Aug 23 '12 at 18:21
    
chris@chris-Modena-M101:~$ sudo apt-get -f reinstall python [sudo] password for chris: E: Invalid operation reinstall chris@chris-Modena-M101:~$ I get this error :/ –  Chris Aug 23 '12 at 18:24
    
Just tried /sigh* now this: chris@chris-Modena-M101:~$ sudo apt-get -f install python Reading package lists... Done Building dependency tree Reading state information... Done python is already the newest version. You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: jockey-gtk : Depends: jockey-common (= 0.9.7-0ubuntu7.1) but 0.9.7-0ubuntu7 is to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). chris@chris-Modena-M101:~$ –  Chris Aug 23 '12 at 18:30
    
ignore this was a dupe message –  Chris Aug 23 '12 at 18:31
    
You're not running stock 12.04 or you did something strange like run an edgers ppa that broke things. –  hbdgaf Aug 23 '12 at 18:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.