yum/python issues...

Gerrit gerrit at nl.linux.org
Sun Feb 15 18:25:30 UTC 2004


Scott Fones wrote:
> Traceback (most recent call last):
>  File "/usr/sbin/up2date", line 29, in ?
>    from up2date_client import up2date
>  File "up2date.py", line 36, in ?
>  File "depSolver.py", line 4, in ?
>  File "packageList.py", line 17, in ?
>  File "up2dateComps.py", line 7, in ?
>  File "/usr/lib/python2.3/site-packages/rhpl/comps.py", line 5, in ?
>    import libxml2
> ImportError: No module named libxml2
> 
> Any ideas?

I've had the same problem. You have installed Python 2.3, and up2date is
being run using Python 2.3. However, libxml2 is installed for Python
2.2. Most probably, /usr/bin/python or /usr/local/bin/python links to
Python 2.3, not Python 2.2. Try to link this one to Python 2.2 instead
of Python 2.3.

This problem is caused by the fact that Fedora Core 1 uses Python2.2,
while many other applications use Python2.3. Libraries in Python are
installed for a specific version. Most Python apps run /usr/bin/python,
so that they often just run the 'latest'. If the libraries are installed
for an older version, they can't be found. There are multiple solutions
possible for this problem:

- Include Python2.2/site-packages in your PYTHONPATH (see 'man python')
- Re-install libxml2 for Python 2.3 (painful because of RPM dependencies)
- Link /usr/bin/python to python2.2 as opposed to Python 2.3 (I advice this one)
- Let Fedora use Python2.3 everywhere - this is done in Fedora 2, so the
  whole problem doesn't arise anymore.

Gerrit.

-- 
Weather in Twenthe, Netherlands 15/02 17:25 UTC:
	6.0°C   wind 0.4 m/s NNW (57 m above NAP)
-- 
Asperger Syndroom - een persoonlijke benadering:
	http://people.nl.linux.org/~gerrit/
Kom in verzet tegen dit kabinet:
	http://www.sp.nl/





More information about the users mailing list