[Yum] Yum and Python Versions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



salvatore wrote on Wednesday 24 March 2004 12:06:
>   > Many options.
> >  1) edit /usr/bin/yum to use #!/usr/bin/python2.3
> >  2) cp /usr/bin/python2.3 /usr/bin/python
> >  3) something cleaner?  is this managed by alternatives?  not sure.
> > 
> 
> So now Ive broken Yum:
> 
> ***
> [salvatore@incom salvatore]$ yum check-update
> Traceback (most recent call last):
>    File "/usr/bin/yum", line 22, in ?
>      import yummain
>    File "/usr/share/yum/yummain.py", line 22, in ?
>      import clientStuff
>    File "/usr/share/yum/clientStuff.py", line 18, in ?
>      import rpm
> ImportError: No module named rpm
> ***
> 
> There were many /usr/bin/python listsings, namely:
> /usr/bin/python
> /usr/bin/python2
> /usr/bin/python2.2
> /usr/bin/python2.3
> 
> I renamed /usr/bin/python2 to /usr/bin/python2_old and 
> /usr/bin/python2.2 to /usr/bin/python2.2_old
> Tried both copying /usr/bin/python2.3 to /usr/bin/python and 
> (separately) telling /usr/bin/yum to use /usr/bin/python2.3; neither
> worked.

I know this doesn't matter any more because you backed out your changes, 
but...

Almost certainly what happened is that your 
/usr/lib/python-2.3/site-packages was incomplete.  In the *standard* 
install (e.g. /usr/lib/python-2.2/site-package for FC1), lots of other 
packages put stuff in there, e.g. the rpm-python package puts the rpm 
module in there.

I went through a very similar thing myself trying to upgrade a RHL 9 system 
to python 2.3.3 while leaving the redhat-config-* scripts happy with python 
2.2.2.  I was able to satisfy rpm without forcing things, but in the end, I 
found that the python 2.3.3 site-packages was empty, realized how much a 
mess this was, and backed everything out.  I implemented another solution 
that didn't involve the standard python rpms (this was for a course that 
needed python 2.3).

The lesson is that in RH/FC land, python is an integral part of the system 
and you really don't want to go messing with the files that the standard 
python rpms put in place.

David


[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux