[Yum] Script to diagnose "no module named yum"

Tim Lauridsen tla at rasmil.dk
Fri Oct 26 11:27:17 UTC 2007


MikeW wrote:
> Since this is still happening, and is a FAQ but is not addressed
> on the Yum FAQ page, I would be interested if anyone has a script
> which examines current settings to determine *why* in any instance
> this error can still occur.
>
> >From much searching it looks as if it's a broken/inconsistent Python
> installation, but Python itself does not appear to provide the means
> to diagnose or fix this. (FWIW I think it should !)
>
> It's not sufficient (as many of the "answers" suggest) to reinstall
> from source or from RPM - or from Synaptic.
> This does not seem to fix whatever it is that is out of alignment,
> since I have reinstalled Python, pygtk and yum from source
> without any improvement.
>
> I would be very grateful if the yum shell script would be able
> to take a more proactive approach to finding out what it
> needed and what was missing - maybe looking in both
> /usr/lib and /usr/local/lib for example, or finding multiple
> Python installations and behaving in a sensible way.
>
> (I once used a LAMP-package installer which did a very good job of
> telling you which bits were working and what seemed incorrect)
>
> I realise that if everything is set up correctly, "things just work"
> but especially if you are installing packages and upgrades,
> that might not be the actual situation.
>
> Many thanks,
> MikeW
>
> _______________________________________________
> Yum mailing list
> Yum at lists.dulug.duke.edu
> https://lists.dulug.duke.edu/mailman/listinfo/yum
>   
-1
the yum module is installed into python's site lib dir.
python -c "from distutils.sysconfig import get_python_lib; print 
get_python_lib()"
and it 'import yum' is failing there is something rotten in your python 
setup.
And it is not yum there shall fix your python installation

Tim



More information about the Yum mailing list