package python2.5 2.5.2-0ubuntu3 failed to install/upgrade: trying to overwrite `/usr/lib/python2.5/site.py', which is also in package python2.5-minimal

Bug #195808 reported by Mike Basinger
14
Affects Status Importance Assigned to Milestone
python2.5 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: python2.5

python install fails after 26-Feb-2008 updates.

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu hardy (development branch)"

| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=========================================-============================-================================================================
ii python2.5 2.5.2-0ubuntu3 An interactive high-level object-oriented language (version 2.5)

ProblemType: Package
Architecture: i386
Date: Tue Feb 26 08:51:13 2008
DistroRelease: 'import site' failed; use -v for traceback Ubuntu 8.04
ErrorMessage: trying to overwrite `/usr/lib/python2.5/site.py', which is also in package python2.5-minimal
NonfreeKernelModules: nvidia
Package: python2.5 2.5.2-0ubuntu3
PackageArchitecture: i386
SourcePackage: python2.5
Title: package python2.5 2.5.2-0ubuntu3 failed to install/upgrade: trying to overwrite `/usr/lib/python2.5/site.py', which is also in package python2.5-minimal
Uname: Linux 2.6.24-8-generic i686

Revision history for this message
Mike Basinger (mike.basinger) wrote :
Revision history for this message
Mike Basinger (mike.basinger) wrote :

Keep getting
'import site' failed; use -v for traceback
when I sudo apt-get upgrade or sudo apt-get dist-upgrade

Revision history for this message
Thomas Perl (thp) wrote :

Also getting this. The last python updates completely broke my Python installation:

thp@macbook:~/src/gpodder$ python
'import site' failed; use -v for traceback
Python 2.5.2 (r252:60911, Feb 26 2008, 12:39:36)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import site
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/site.py", line 415, in <module>
    main()
  File "/usr/lib/python2.5/site.py", line 408, in main
    execsitecustomize()
  File "/usr/lib/python2.5/site.py", line 389, in execsitecustomize
    import sitecustomize
  File "/usr/lib/python2.5/sitecustomize.py", line 13, in <module>
    if os.path.isdir(local_site_python):
NameError: name 'os' is not defined

Temporary fix is to add "import os" after the line "import sys" in /usr/lib/python2.5/sitecustomize.py, which seems to fix the problem for me.

Revision history for this message
Thomas Perl (thp) wrote :

Oh, yes: It should probably be

import os.path

to make it completely nice :)

Revision history for this message
Thomas Perl (thp) wrote :
Hans Deragon (deragon)
Changed in python2.5:
status: New → Confirmed
Steven Harms (sharms)
Changed in python2.5:
assignee: nobody → ubuntu-core-dev
Revision history for this message
Matthias Klose (doko) wrote :

fixed in -0ubuntu4

Changed in python2.5:
assignee: ubuntu-core-dev → nobody
status: Confirmed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote :

This bug should be resolved in the upload of python2.5 2.5.2-0ubuntu4:

python2.5 (2.5.2-0ubuntu4) hardy; urgency=low

  * Move site.py to python2.4-minimal, remove `addbuilddir' from site.py,
    which is unnecessary for installed builds.

 -- Matthias Klose <email address hidden> Tue, 26 Feb 2008 12:34:46 +0000

This file was in python2.5-minimal in previous versions of the package and was moved to python2.5 by mistake, so now that it's moved back there should be no further upgrade problems. Please try to update to the latest version to confirm.

Revision history for this message
Mike Basinger (mike.basinger) wrote :

Fixed confirmed, everything seems fine now.

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.