python2.7: not found: Unable to install or remove any packages

266

Ooh, something has gone terribly wrong unpacking your python .deb. Try dpkg -i /var/cache/apt/archives/python2.7-minimal*deb and see if that fixes the dpkg error.

Share:
266

Related videos on Youtube

vZ10
Author by

vZ10

Updated on September 18, 2022

Comments

  • vZ10
    vZ10 over 1 year

    I want to add validation to input data in django admin, so I've added such code to my models.py

    class Score(models.Model):
      #fields description
        def save(self, *args, **kw):
            if (validating data):
                super(Score, self).save(*args, **kw)
            else:
                raise forms.ValidationError("Error input")
    

    I can't understand what I have to write in ValidationError to see this message.

  • Terminal
    Terminal about 11 years
    I checked my /usr/bin directory: lrwxrwxrwx 1 nolando nolando 9 Apr 17 2012 python -> python2.7 lrwxrwxrwx 1 nolando nolando 9 Apr 17 2012 python2 -> python2.7 I keep getting no file or directory when I run /usr/bin/python.
  • Terminal
    Terminal about 11 years
    Tried this with the python-minimal_2.7.3*deb archive but it failed.
  • Dennis Kaarsemaker
    Dennis Kaarsemaker about 11 years
    What's the error you get? If it's the same we can go one level deeper, to make it just unpack (which should restore /usr/bin/python2.7): sudo dpkg --unpack thatfile.deb
  • Terminal
    Terminal about 11 years
    Error is: /var/lib/dpkg/info/python-minimal.postinst: 4: /var/lib/dpkg/info/python-minimal.potinst: python2.7: not found, and then goes on to say it returned an error code of 127.
  • Terminal
    Terminal about 11 years
    Going to reinstall, thanks for taking a shot at this.
  • Ender
    Ender over 4 years
    it works for me!