Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 253565 - app-arch/q7z-0.7.1 - ImportError: No module named elementtree.ElementTree
Summary: app-arch/q7z-0.7.1 - ImportError: No module named elementtree.ElementTree
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Ben de Groot (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-03 15:28 UTC by Johannes H.
Modified: 2009-06-06 23:04 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes H. 2009-01-03 15:28:18 UTC
Installing q7z fails with:

>>> Compiling source in /var/tmp/portage/app-arch/q7z-0.7.1/work/Q7Z/Build ...
make -j3
pyuic4 ../Source/Main.ui -o ../Source/Ui_Main.py
pyrcc4 ../Source/Main.qrc -o ../Source/Main_rc.py
pyuic4 ../Source/Settings.ui -o ../Source/Ui_Settings.py
pyrcc4 ../Source/Settings.qrc -o ../Source/Settings_rc.py
Traceback (most recent call last):
  File "/usr/lib64/python2.5/site-packages/PyQt4/uic/pyuic.py", line 7, in <module>
    from PyQt4 import QtCore, uic
  File "//usr/lib64/python2.5/site-packages/PyQt4/uic/__init__.py", line 7, in <module>
    from Compiler import indenter, compiler
  File "//usr/lib64/python2.5/site-packages/PyQt4/uic/Compiler/compiler.py", line 9, in <module>
    from PyQt4.uic import uiparser
  File "//usr/lib64/python2.5/site-packages/PyQt4/uic/uiparser.py", line 16, in <module>
    from PyQt4.elementtree.ElementTree import parse, SubElement
ImportError: No module named elementtree.ElementTree
Traceback (most recent call last):
  File "/usr/lib64/python2.5/site-packages/PyQt4/uic/pyuic.py", line 7, in <module>
    from PyQt4 import QtCore, uic
  File "//usr/lib64/python2.5/site-packages/PyQt4/uic/__init__.py", line 7, in <module>
    from Compiler import indenter, compiler
  File "//usr/lib64/python2.5/site-packages/PyQt4/uic/Compiler/compiler.py", line 9, in <module>
    from PyQt4.uic import uiparser
  File "//usr/lib64/python2.5/site-packages/PyQt4/uic/uiparser.py", line 16, in <module>
    from PyQt4.elementtree.ElementTree import parse, SubElement
ImportError: No module named elementtree.ElementTree
make: *** [Settings_Ui.py] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Main_Ui.py] Error 1

Fixed by installing dev-python/elementtree.

Reproducible: Always

Steps to Reproduce:
Just install (withoung elementtree being installed)
Comment 1 Dror Levin (RETIRED) gentoo-dev 2009-05-29 18:53:20 UTC
q7z requires python 2.5 which has the elementtree module built-in, so I suppose you tried to install q7z with an earlier version of python. Had you provided your emerge --info I could see if that is the case, please don't forget to include it in future bug reports.
Comment 2 Ben de Groot (RETIRED) gentoo-dev 2009-05-29 20:17:37 UTC
Looks like the reporter is using python 2.5. CCing python herd: what is your take on this?
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-05-29 20:20:24 UTC
Please post the output of:
emerge --info
emerge -pv python
Comment 4 Johannes H. 2009-05-29 23:58:23 UTC
Here it is, but some time has gone by since the report -- Don't know how relevant the info is. If you need more info let me know about it.

emerge --info
Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.29-gentoo-r3 x86_64)
=================================================================
System uname: Linux-2.6.29-gentoo-r3-x86_64-AMD_Athlon-tm-_Dual_Core_Processor_4450B-with-gentoo-2.0.0
Timestamp of tree: Thu, 28 May 2009 11:45:03 +0000
app-shells/bash:     4.0_p24
dev-java/java-config: 2.1.7
dev-lang/python:     2.5.4-r2, 2.6.2
dev-util/cmake:      2.6.4
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r2
sys-apps/sandbox:    1.9
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.29
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -mtune=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=native -mtune=native"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowex X acpi alsa amd64 bzip2 caps crypt custom-cxxflags dbus dri hal hardened ipv6 jpeg kde kdeenablefinal kdehiddenvisibility mmx mmxext multilib nls ntpl ntplonly opengl openmp pch pic pulseaudio python qt3 qt4 readline sse sse2 ssl threads unicode xcb xinerama" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="*" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="*" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev vesa ati radeon radeonhd"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

emerge -pv python:
[ebuild   R   ] dev-lang/python-2.6.2  USE="berkdb doc gdbm ipv6 ncurses readline ssl threads tk xml -build -examples -sqlite -ucs2 -wininst" 
Comment 5 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-06-06 21:49:48 UTC
Please post the output of:
python -c 'import xml.etree.ElementTree'
python -c 'import xml.etree.cElementTree'
Comment 6 Johannes H. 2009-06-06 22:59:56 UTC
Your commands work (no output). To verify that everything is allright now I did an "emerge -C dev-python/elementtree app-arch/q7z" followed by an "emerge app-arch/q7z". Installation succeeded, w/o pulling in dev-python/elementtree. Running "Q7Z.pyw" succeeds as well. So I think some dependencies were broken or I changed something on my system. I think I was running python 2.5 and I defaulted to python 2.6 (btw: "python2.5 /usr/bin/Q7Z.pyw" fails and "python /usr/bin/Q7Z.pyw" works) or I used python w/o the xml-USE-flag?! However, imho this bug can be closed.