Python 2.7 fails to install after upgrade from 12.04 to 12.10

Bug #1079836 reported by Christopher Garay
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python2.7 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

After installing, I saw a bunch of errors about python 2.7.3 not being configured. I typed

sudo apt-get install python2.7

which yields the following error followed by a long list of related errors (full list at http://pastebin.com/n15SNfuF):

python2.7: can't open file '/usr/lib/python2.7/py_compile.py': [Errno 2] No such file or directory
dpkg: error processing python2.7 (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of python:
 python depends on python2.7 (>= 2.7.3); however:
  Package python2.7 is not configured yet.

I do have a version of python2.7.3 installed from source. I tried redirecting PYTHONHOME to the library directory of that python but that didn't help. Removing those libraries also fails to fix the problem. Finally, I tried to download the package using apt-get download and to install from the resulting .deb file but got the same error.

affects: launchpad → ubuntu
affects: ubuntu → python2.7 (Ubuntu)
Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 1079836] [NEW] Python 2.7 fails to install after upgrade from 12.04 to 12.10

The pastebin you reference no longer exists.

Remove the version you installed from source and try to work it out from
there. Any normal Ubuntu system will have python2.7 installed on it, so it
sounds like you are having some kind of configuration issue with your local
system.

Revision history for this message
Christopher Garay (christopher-d-garay) wrote :

I've tried that as well. Removing the libraries I installed and using Ubuntu's python executable results in the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named site

Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 1079836] Re: Python 2.7 fails to install after upgrade from 12.04 to 12.10

What happens if you do:

sudo apt-get install python2.7 --reinstall

Revision history for this message
Christopher Garay (christopher-d-garay) wrote :

I receive the following error:

"E: Internal Error, No file name for python2.7:amd64"

sudo apt-get install python2.7 yields this error which may be informative:

"Reading package lists...
Building dependency tree...
Reading state information...
python2.7 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
502 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python2.7 (2.7.3-5ubuntu4) ...
python2.7: can't open file '/usr/lib/python2.7/py_compile.py': [Errno
2] No such file or directory"

On Fri, Nov 16, 2012 at 6:43 PM, Scott Kitterman <email address hidden> wrote:
> What happens if you do:
>
> sudo apt-get install python2.7 --reinstall
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1079836
>
> Title:
> Python 2.7 fails to install after upgrade from 12.04 to 12.10
>
> Status in “python2.7” package in Ubuntu:
> New
>
> Bug description:
> After installing, I saw a bunch of errors about python 2.7.3 not being
> configured. I typed
>
> sudo apt-get install python2.7
>
> which yields the following error followed by a long list of related
> errors (full list at http://pastebin.com/n15SNfuF):
>
> python2.7: can't open file '/usr/lib/python2.7/py_compile.py': [Errno 2] No such file or directory
> dpkg: error processing python2.7 (--configure):
> subprocess installed post-installation script returned error exit status 2
> dpkg: dependency problems prevent configuration of python:
> python depends on python2.7 (>= 2.7.3); however:
> Package python2.7 is not configured yet.
>
> I do have a version of python2.7.3 installed from source. I tried
> redirecting PYTHONHOME to the library directory of that python but
> that didn't help. Removing those libraries also fails to fix the
> problem. Finally, I tried to download the package using apt-get
> download and to install from the resulting .deb file but got the same
> error.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1079836/+subscriptions

Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 1079836] Re: Python 2.7 fails to install after upgrade from 12.04 to 12.10

Is this a 32 bit or 64 bit installation?

Revision history for this message
Christopher Garay (christopher-d-garay) wrote : Re: [Bug 1079836] Re: Python 2.7 fails to install after upgrade from 12.04 to 12.10

This is a 64 bit installation.

On Nov 18, 2012, at 2:00 PM, Scott Kitterman <email address hidden> wrote:

> Is this a 32 bit or 64 bit installation?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1079836
>
> Title:
> Python 2.7 fails to install after upgrade from 12.04 to 12.10
>
> Status in “python2.7” package in Ubuntu:
> New
>
> Bug description:
> After installing, I saw a bunch of errors about python 2.7.3 not being
> configured. I typed
>
> sudo apt-get install python2.7
>
> which yields the following error followed by a long list of related
> errors (full list at http://pastebin.com/n15SNfuF):
>
> python2.7: can't open file '/usr/lib/python2.7/py_compile.py': [Errno 2] No such file or directory
> dpkg: error processing python2.7 (--configure):
> subprocess installed post-installation script returned error exit status 2
> dpkg: dependency problems prevent configuration of python:
> python depends on python2.7 (>= 2.7.3); however:
> Package python2.7 is not configured yet.
>
> I do have a version of python2.7.3 installed from source. I tried
> redirecting PYTHONHOME to the library directory of that python but
> that didn't help. Removing those libraries also fails to fix the
> problem. Finally, I tried to download the package using apt-get
> download and to install from the resulting .deb file but got the same
> error.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1079836/+subscriptions

Revision history for this message
Adam Conrad (adconrad) wrote :

The missing file above is in python2.7-minimal, not in python2.7. I suspect the local installation and subsequent removal/cleaning of it may have wiped out some bits there. A manual dpkg -i (or perhaps apt-get --reinstall install python2.7-minimal) followed by trying the same for python2.7 itself may well fix you up.

Revision history for this message
Christopher Garay (christopher-d-garay) wrote :

Thanks for your help Adam and Scott.

apt-get --reinstall install python-minimal
apt-get --reinstall install python

solved this problem for me.

Revision history for this message
Matthias Klose (doko) wrote :

ok, looks like a local, or a local corrupted file error

Changed in python2.7 (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.