Summary: | dev-python/pip-7.1.2 - ImportError: No module named utils | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michal Plichta <mplichta> |
Component: | Current packages | Assignee: | Python Gentoo Team <python> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | jlec, michael.fritze, mplichta |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | portage log file of dev-lang/python-2.7.2-r3 installing some files into pip |
Description
Michal Plichta
2015-11-07 11:10:12 UTC
Portage 2.2.20.1 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop, gcc-4.9.3, glibc-2.21-r1, 4.1.0-pf1 x86_64) ================================================================= System uname: Linux-4.1.0-pf1-x86_64-AMD_E-450_APU_with_Radeon-tm-_HD_Graphics-with-gentoo-2.2 KiB Mem: 7760916 total, 573524 free KiB Swap: 10485756 total, 10485756 free Timestamp of repository gentoo: Fri, 06 Nov 2015 14:02:18 +0000 sh bash 4.3_p42 ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 ccache version 3.1.9 [disabled] app-shells/bash: 4.3_p42::gentoo dev-java/java-config: 2.2.0::gentoo dev-lang/perl: 5.20.2::gentoo dev-lang/python: 2.7.10::gentoo, 3.4.3::gentoo dev-util/ccache: 3.1.9-r4::gentoo dev-util/cmake: 3.3.1-r1::gentoo dev-util/pkgconfig: 0.28-r2::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.17::gentoo sys-apps/sandbox: 2.6-r1::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69::gentoo sys-devel/automake: 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo sys-devel/binutils: 2.25.1-r1::gentoo sys-devel/gcc: 4.9.3::gentoo sys-devel/gcc-config: 1.7.3::gentoo sys-devel/libtool: 2.4.6::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers) sys-libs/glibc: 2.21-r1::gentoo Repositories: sublime-text location: /var/lib/layman/sublime-text masters: gentoo priority: 0 spring location: /var/lib/layman/Spring masters: gentoo priority: 1 emc location: /var/lib/layman/emc masters: gentoo priority: 2 funtoo-deadbeef location: /var/lib/layman/funtoo-deadbeef masters: gentoo priority: 3 mv location: /var/lib/layman/mv masters: gentoo priority: 4 sunrise location: /var/lib/layman/sunrise masters: gentoo priority: 5 gentoo location: /usr/portage sync-type: git sync-uri: https://github.com/gentoo-mirror/gentoo priority: 6 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -O2 -fomit-frame-pointer -pipe" DISTDIR="/var/portage/distfiles" EMERGE_DEFAULT_OPTS="--jobs=1 --load-average=0.50" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms split-elog split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.mirror.pw.edu.pl/ http://ftp.vectranet.pl/gentoo/ http://mirror.netcologne.de/gentoo/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl acpi alsa amd64 avahi bash-completion berkdb bluetooth branding bzip2 cairo cdda cddb cdr cli consolekit cracklib crypt cups cxx dbus directfb djvu dri dts dvd dvdr emboss encode exif fam fbcon ffmpeg firefox flac fontconfig fortran gdbm gif glamor gnome-keyring gpm gstreamer gtk iconv icu ipv6 jpeg jpeg2k lame lcms ldap libnotify mad matroska mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp orc pam pango pcre pdf png policykit ppds quicktime raw readline samba sdl seccomp session smp spell sse sse2 sse3 ssl ssse3 startup-notification svg tcpd tiff truetype udev udisks unicode upnp upower usb v4l vim-syntax vorbis wmf wxwidgets x264 xattr xcb xcomposite xinerama xml xpm xv xvid zeroconf zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en pl en_US pl_PL" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="x86_64 i386" QEMU_USER_TARGETS="x86_64 i386" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="radeon" XFCE_PLUGINS="brightness menu trash logout" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON Looks like pip-7.1.2 requires: mock; extra == 'testing' scripttest (>=1.3); extra == 'testing' virtualenv (>=1.10); extra == 'testing' pytest; extra == 'testing' as pointed at https://pypi.python.org/pypi/pip >=scripttest-1.3 (and isn't stable yet) and >=virtualenv-1.10 were not pulled with pip: gopher emc # eix scripttest * dev-python/scripttest Available versions: 1.2-r1 ~1.3 {test PYTHON_TARGETS="python2_7 python3_3 python3_4"} Homepage: http://pythonpaste.org/scripttest/ https://pypi.python.org/pypi/ScriptTest Description: A very small text templating language gopher emc # eix virtualenv * dev-python/virtualenv Available versions: 12.0.5 ~13.1.0 ~13.1.1 13.1.2 {doc test PYTHON_TARGETS="pypy pypy3 python2_7 python3_3 python3_4 python3_5"} Homepage: http://www.virtualenv.org/ https://pypi.python.org/pypi/virtualenv https://github.com/pypa/virtualenv/ Description: Virtual Python Environment builder Compile scripttest and virtualenv cause pip pulled first: # emerge -1pv dev-python/scripttest dev-python/virtualenv Calculating dependencies ........ done! [ebuild N ] dev-python/pip-7.1.2::gentoo PYTHON_TARGETS="python2_7 python3_4 (-pypy) (-pypy3) -python3_3 (-python3_5)" 0 KiB [ebuild N ~] dev-python/scripttest-1.3::gentoo USE="{-test}" PYTHON_TARGETS="python2_7 python3_4 -python3_3" 0 KiB [ebuild N ] dev-python/virtualenv-13.1.2::gentoo USE="-doc {-test}" PYTHON_TARGETS="python2_7 python3_4 (-pypy) (-pypy3) -python3_3 (-python3_5)" 0 KiB I have a similiar output, seems as it is same bug: ..... byte-compiling /var/tmp/portage/dev-python/pip-7.1.2/image//_python2.7/usr/lib64/python2.7/site-packages/pip/cmdoptions.py to cmdoptions.pyc writing byte-compilation script '/var/tmp/portage/dev-python/pip-7.1.2/temp/tmpYFT9qJ.py' /usr/bin/python2.7 -OO /var/tmp/portage/dev-python/pip-7.1.2/temp/tmpYFT9qJ.py removing /var/tmp/portage/dev-python/pip-7.1.2/temp/tmpYFT9qJ.py running install_egg_info running egg_info writing requirements to /var/tmp/portage/dev-python/pip-7.1.2/work/pip-7.1.2-python2_7/pip.egg-info/requires.txt writing /var/tmp/portage/dev-python/pip-7.1.2/work/pip-7.1.2-python2_7/pip.egg-info/PKG-INFO writing top-level names to /var/tmp/portage/dev-python/pip-7.1.2/work/pip-7.1.2-python2_7/pip.egg-info/top_level.txt writing dependency_links to /var/tmp/portage/dev-python/pip-7.1.2/work/pip-7.1.2-python2_7/pip.egg-info/dependency_links.txt writing entry points to /var/tmp/portage/dev-python/pip-7.1.2/work/pip-7.1.2-python2_7/pip.egg-info/entry_points.txt reading manifest file '/var/tmp/portage/dev-python/pip-7.1.2/work/pip-7.1.2-python2_7/pip.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching 'pip/_vendor/README.rst' warning: no files found matching 'pip/_vendor/vendor.txt' warning: no previously-included files found matching '.coveragerc' warning: no previously-included files found matching '.mailmap' warning: no previously-included files found matching '.travis.yml' warning: no previously-included files found matching 'pip/_vendor/Makefile' warning: no previously-included files found matching 'tox.ini' warning: no previously-included files found matching 'dev-requirements.txt' warning: no files found matching '*.pem' under directory 'pip/_vendor' no previously-included directories found matching '.travis' no previously-included directories found matching 'docs/_build' no previously-included directories found matching 'contrib' no previously-included directories found matching 'tasks' no previously-included directories found matching 'tests' writing manifest file '/var/tmp/portage/dev-python/pip-7.1.2/work/pip-7.1.2-python2_7/pip.egg-info/SOURCES.txt' Copying /var/tmp/portage/dev-python/pip-7.1.2/work/pip-7.1.2-python2_7/pip.egg-info to /var/tmp/portage/dev-python/pip-7.1.2/image//_python2.7/usr/lib64/python2.7/site-packages/pip-7.1.2-py2.7.egg-info running install_scripts Installing pip script to /var/tmp/portage/dev-python/pip-7.1.2/image//_python2.7/usr/lib/python-exec/python2.7 Installing pip2.7 script to /var/tmp/portage/dev-python/pip-7.1.2/image//_python2.7/usr/lib/python-exec/python2.7 Installing pip2 script to /var/tmp/portage/dev-python/pip-7.1.2/image//_python2.7/usr/lib/python-exec/python2.7 * python2_7: running distutils-r1_run_phase python_install_all Traceback (most recent call last): File "pip/__init__.py", line 12, in <module> from pip.exceptions import InstallationError, CommandError, PipError ImportError: cannot import name PipError * ERROR: dev-python/pip-7.1.2::gentoo failed (install phase): * (no error message) * * Call stack: * ebuild.sh, line 93: Called src_install * environment, line 3659: Called distutils-r1_src_install * environment, line 1023: Called _distutils-r1_run_common_phase 'python_install_all' * environment, line 390: Called _distutils-r1_run_foreach_impl 'python_install_all' * environment, line 403: Called python_foreach_impl 'distutils-r1_run_phase' 'python_install_all' * environment, line 3209: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_install_all' * environment, line 2326: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_install_all' * environment, line 2324: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_install_all' * environment, line 669: Called distutils-r1_run_phase 'python_install_all' * environment, line 988: Called python_install_all * environment, line 3350: Called die * The specific snippet of code: * ${EPYTHON} pip/__init__.py completion --bash > "${COMPLETION}" || die; * * If you need support, post the output of `emerge --info '=dev-python/pip-7.1.2::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-python/pip-7.1.2::gentoo'`. * The complete build log is located at '/mnt/portage/log/dev-python:pip-7.1.2:20151105-101101.log.gz'. * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-python/pip-7.1.2/temp/build.log.gz'. * The ebuild environment file is located at '/var/tmp/portage/dev-python/pip-7.1.2/temp/environment'. * Working directory: '/var/tmp/portage/dev-python/pip-7.1.2/work/pip-7.1.2' Is /usr/lib/python2.7/site-packages/six/ a directory on your system?? only that: gopher emc # ls -la /usr/lib/python2.7/site-packages/six* -rw-r--r-- 1 root root 30098 Oct 7 05:12 /usr/lib/python2.7/site-packages/six.py -rw-r--r-- 1 root root 30256 Nov 6 22:43 /usr/lib/python2.7/site-packages/six.pyc -rw-r--r-- 1 root root 28623 Nov 6 22:43 /usr/lib/python2.7/site-packages/six.pyo /usr/lib/python2.7/site-packages/six-1.10.0-py2.7.egg-info: total 44 drwxr-xr-x 2 root root 4096 Nov 6 22:43 . drwxr-xr-x 190 root root 20480 Nov 7 23:55 .. -rw-r--r-- 1 root root 1 Nov 6 22:43 dependency_links.txt -rw-r--r-- 1 root root 1422 Nov 6 22:43 PKG-INFO -rw-r--r-- 1 root root 249 Nov 6 22:43 SOURCES.txt -rw-r--r-- 1 root root 4 Nov 6 22:43 top_level.txt From which pip version are you upgrading? I just installed pip in a stage3 chroot and it worked. I don't think there is a dependency problems. I hadn't pip installed it was pulled by dev-python/mock if I remember well, I will check at home. (In reply to Justin Lecher from comment #7) > From which pip version are you upgrading? Hi, on my box pip is also a new dependency by pbr which is required by lockfile: # equery d dev-python/pip * These packages depend on dev-python/pip: dev-python/pbr-1.8.1 (dev-python/pip[python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_pypy(-)?,python_targets_pypy3(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_pypy(-),-python_single_target_pypy3(-)]) # equery d dev-python/pbr * These packages depend on dev-python/pbr: dev-python/lockfile-0.11.0-r1 (>dev-python/pbr-0.7[python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_pypy(-)?,python_targets_pypy3(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_pypy(-),-python_single_target_pypy3(-)]) # equery d dev-python/lockfile * These packages depend on dev-python/lockfile: app-backup/duplicity-0.6.23-r1 (dev-python/lockfile) dev-python/CacheControl-0.11.5 (>=dev-python/lockfile-0.9[python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_pypy(-)?,python_targets_pypy3(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_pypy(-),-python_single_target_pypy3(-)]) As a last resort, try running this: rm -r /usr/lib64/python2.7/site-packages/pip* Then try installing dev-python/pip again. Hi Mike, that works for me! I checked the pip-1.1-py2.7.egg dir in /usr/lib64/python2.7/site-packages/ if this belongs to any package, it did not. So I moved it to a temporary dir and could then install pip. During install, /usr/bin/pip was overwritten: * Detected file collision(s): * * /usr/bin/pip Now I'm running revdep-rebuild and the python-updater. Thanks, Micha. Mike, any idea where that old stuff came from? How do you suggest to resolve this bug? I've have PyCharm installed I'm pretty sure I din't install pip thru it, but maybe PyCharm add pip anyway. I have have no other clue. (In reply to Michal Plichta from comment #14) > I've have PyCharm installed I'm pretty sure I din't install pip thru it, but > maybe PyCharm add pip anyway. I have have no other clue. Hopefully you aren't using pycharm as root, so it shouldn't install pip into your system path. I rather suspect the old python eclasses. (In reply to Mike Gilbert from comment #11) > As a last resort, try running this: > > rm -r /usr/lib64/python2.7/site-packages/pip* > > Then try installing dev-python/pip again. Yes, it helpd (In reply to Justin Lecher from comment #15) > (In reply to Michal Plichta from comment #14) > > I've have PyCharm installed I'm pretty sure I din't install pip thru it, but > > maybe PyCharm add pip anyway. I have have no other clue. > > Hopefully you aren't using pycharm as root, so it shouldn't install pip into > your system path. I rather suspect the old python eclasses. Of course I'm not. /usr/lib64/python2.7/site-packages/pip* and /usr/bin/pip were changed 2 years ago, I haven't portage elog from this time to correlate what could installed them, but python ecalss is quite good cguess. (In reply to Justin Lecher from comment #13) > Mike, any idea where that old stuff came from? How do you suggest to resolve > this bug? It's hard to say where it came from... we don't have any control over what the user runs/installs outside of portage. I don't think python.eclass has anything to do with it. As resolving this bug: the user had an old version of pip install outside of portage's control. That's INVALID in my book. Created attachment 416514 [details]
portage log file of dev-lang/python-2.7.2-r3 installing some files into pip
Hi all, my problem is solved, but just to find out where these files come from: in (moved) dir /usr/lib64/python2.7/site-packages/pip-1.1-py2.7.egg/pip/: ls -tla --full-time insgesamt 404 drwxr-xr-x 4 root root 4096 2012-03-03 15:08:19.702575105 +0100 . -rw-r--r-- 1 root root 9274 2012-02-22 23:14:05.028073418 +0100 __init__.pyc <snip> -rwxr-xr-x 1 root root 16632 2012-02-22 23:14:04.983071898 +0100 util.py drwxr-xr-x 4 root root 4096 2012-02-22 23:14:04.980071798 +0100 .. In my portage log dir I found around this time some logs: -rw-rw---- 1 portage portage 4330 2012-02-22 23:33:30.000000000 +0100 net-zope:zope-interface-3.7.0:20120222-223204.log.gz -rw-rw---- 1 portage portage 1145 2012-02-22 23:33:29.000000000 +0100 net-zope:zope-interface-3.7.0:20120222-223328.log.gz -rw-rw---- 1 portage portage 1742 2012-02-22 23:20:31.000000000 +0100 net-zope:zope-interface-3.7.0:20120222-222027.log.gz -rw-rw---- 1 portage portage 1743 2012-02-22 23:02:58.000000000 +0100 net-zope:zope-interface-3.7.0:20120222-220255.log.gz Last 2 did fail to emerge, no file istalled, first 2 installed files but nothing into pip. Maybe I ran python-updater in between because of failing packages? But I did not found any log file. I'm pretty sure that i did not install these files out of portage, there must be another reason. Ok, found zgrep, searching my log dir gives me (beside some 'invalid compressed data--format violated'): zgrep '/usr/lib64/python2.7/site-packages/pip-1.1-py2.7.egg/pip/' * dev-lang:python-2.7.2-r3:20120303-140547.log.gz:<<< /usr/lib64/python2.7/site-packages/pip-1.1-py2.7.egg/pip/util.py[co] dev-lang:python-2.7.2-r3:20120303-140547.log.gz:<<< /usr/lib64/python2.7/site-packages/pip-1.1-py2.7.egg/pip/status_codes.py[co] dev-lang:python-2.7.2-r3:20120303-140547.log.gz:<<< /usr/lib64/python2.7/site-packages/pip-1.1-py2.7.egg/pip/runner.py[co] So, dev-lang/python-2.7.2-r3 actually did install files right there. But not on all installs, since there are more than one: -rw-rw---- 1 portage portage 11856 2012-05-17 13:05:25.000000000 +0200 dev-lang:python-2.7.2-r3:20120517-110520.log.gz -rw-rw---- 1 portage portage 62186 2012-03-03 15:08:20.000000000 +0100 dev-lang:python-2.7.2-r3:20120303-140547.log.gz -rw-rw---- 1 portage portage 11720 2012-03-03 15:08:14.000000000 +0100 dev-lang:python-2.7.2-r3:20120303-140810.log.gz I attached log file if someone wants to check this. |