# Python macht mich [nicht mehr] fertig

## SvenFischer

```

>>> Source prepared.

>>> Configuring source in /var/tmp/portage/dev-java/lucene-2.9.4/work/lucene-2.9.4 ...

Rewriting attributes

Traceback (most recent call last):

  File "/usr/lib64/javatoolkit/bin/xml-rewrite-3.py-2.6", line 30, in <module>

    from javatoolkit.xml.DomRewriter import DomRewriter

ImportError: No module named javatoolkit.xml.DomRewriter

 * If the output above contains:

 * ImportError:

 * /usr/lib/python2.4/site-packages/_xmlplus/parsers/pyexpat.so:

 * undefined symbol: PyUnicodeUCS2_DecodeUTF8

 * Try re-emerging dev-python/pyxml

 * ERROR: dev-java/lucene-2.9.4 failed (configure phase):

 *   xml-rewrite2 failed: ./build.xml  Look at the eerror message above

 * 

 * Call stack:

 *     ebuild.sh, line   56:  Called src_configure

 *   environment, line 4341:  Called java-ant-2_src_configure

 *   environment, line 2127:  Called java-ant_bsfix

 *   environment, line 2149:  Called java-ant_bsfix_files './common-build.xml' './build.xml'

 *   environment, line 2244:  Called _bsfix_die 'xml-rewrite2 failed: ./build.xml'

 *   environment, line  397:  Called die

 * The specific snippet of code:

 *           die ${1} " Look at the eerror message above";

 * 

 * If you need support, post the output of 'emerge --info =dev-java/lucene-2.9.4',

 * the complete build log and the output of 'emerge -pqv =dev-java/lucene-2.9.4'.

!!! When you file a bug report, please include the following information:

GENTOO_VM=sun-jdk-1.6  CLASSPATH="" JAVA_HOME="/opt/sun-jdk-1.6.0.26"

JAVACFLAGS="-source 1.4 -target 1.4" COMPILER=""

and of course, the output of emerge --info

 * The complete build log is located at '/var/tmp/portage/dev-java/lucene-2.9.4/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/dev-java/lucene-2.9.4/temp/environment'.

 * S: '/var/tmp/portage/dev-java/lucene-2.9.4/work/lucene-2.9.4'

```

Wieso sucht der in der 2.4er Python -Version?

 *Quote:*   

> 
> 
>  * /usr/lib/python2.4/site-packages/_xmlplus/parsers/pyexpat.so: 
> 
> 

 

```

core2duo sven # eselect python list

Available Python interpreters:

  [1]   python2.7 *

  [2]   python3.1

```

emerge pyxml und expat habe ich schon zigmal hinter mir...

Der Fehler tritt auch hier auf:

```

>>> Emerging (1 of 29) dev-java/xml-commons-external-1.3.04

 * xml-commons-external-1.3.04.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                           [ ok ]

 * Using: sun-jdk-1.6

>>> Unpacking source...

>>> Unpacking xml-commons-external-1.3.04.tar.bz2 to /var/tmp/portage/dev-java/xml-commons-external-1.3.04/work

>>> Source unpacked in /var/tmp/portage/dev-java/xml-commons-external-1.3.04/work

>>> Compiling source in /var/tmp/portage/dev-java/xml-commons-external-1.3.04/work/xml-commons-external-1.3.04 ...

Rewriting attributes

Traceback (most recent call last):

  File "/usr/lib64/javatoolkit/bin/xml-rewrite-3.py-2.6", line 30, in <module>

    from javatoolkit.xml.DomRewriter import DomRewriter

ImportError: No module named javatoolkit.xml.DomRewriter

 * If the output above contains:

 * ImportError:

 * /usr/lib/python2.4/site-packages/_xmlplus/parsers/pyexpat.so:

 * undefined symbol: PyUnicodeUCS2_DecodeUTF8

 * Try re-emerging dev-python/pyxml

 * ERROR: dev-java/xml-commons-external-1.3.04 failed (compile phase):

 *   xml-rewrite2 failed: ./build.xml  Look at the eerror message above

```

----------

## py-ro

Bei der Umstellung python-updater laufen lassen?

----------

## Necoro

Irgendwann mal vergessen python-updater laufen zu lassen?

Schau mal, was alles noch unter /usr/lib/python2.[456]/site-packages liegt ...

----------

## franzf

xml-rewrite-3.py-2.6 will sicher ein python2.6 - da du erst ab 2.7 installiert hast, nimmt er vielleicht das 2.4er - aber da kenn ich mich zu wenig aus.

Ich würde dev-java/javatoolkit und pyxml neu installieren.

Wahrscheinlich ist es auch ein älteres System. Hast du bei python-Upgrades regelmäßig python-updater laufen lassen? wenn nicht -> nachholen.

----------

## SvenFischer

Ja, ich habe mit dem python-updater sicher irgendwann mal geschlafen!

@franzf

Vielen Dank! Die Lösung liegt in

emerge javatoolkit

----------

