Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 536462

Summary: dev-python/pip-6.0.6 - python2_7: running distutils-r1_run_phase python_install_all(): File "pip/__init__.py", line 13, in <module> from pip.utils import get_installed_distributions, get_prog ImportError: No module named utils
Product: Gentoo Linux Reporter: PM <mitaspiotr>
Component: [OLD] DevelopmentAssignee: Python Gentoo Team <python>
Status: RESOLVED INVALID    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log

Description PM 2015-01-13 10:22:26 UTC
* python2_7: running distutils-r1_run_phase python_install_all
Traceback (most recent call last):
  File "pip/__init__.py", line 13, in <module>
    from pip.utils import get_installed_distributions, get_prog
ImportError: No module named utils

Reproducible: Always
Comment 1 PM 2015-01-13 10:23:08 UTC
Created attachment 393838 [details]
build.log
Comment 2 Ian Delaney (RETIRED) gentoo-dev 2015-01-21 01:58:21 UTC
well like other recent bugs this seems to be related to setuptools, however we're getting inconsistency between users with emerging effectively.  The

No module named utils

or similar has shown up on others
Comment 3 Zdenek Behan 2015-01-24 20:52:23 UTC
I am getting this bug too. Is happens as a post-install with many packages, specifically for me, pip and lockfile.

The code is indeed wrong, the module is called 'util', not 'utils'. I'm baffled where does this inconsistency come from.
Comment 4 Zdenek Behan 2015-01-24 21:03:18 UTC
Gah. Writing faster than thinking. Apparently, on my system, there was an old version of pip, inside /usr/lib64/python2.7/site-packages/pip-1.4.1-py2.7.egg.

It was not portage-managed, yet was somehow preferred over everything. Perhaps an artifact from the old times when I may have installed pip through eggs.


This whole duality of being able to either emerge or easy_install/pip packages is very confusing and there really should only be one way of installing system-wide packages (emerge). In the meantime, the python eclass could perform some sanity checks for packages it is trying to use.
Comment 5 Tim Harder gentoo-dev 2015-01-31 08:14:34 UTC
(In reply to Zdenek Behan from comment #4)
> This whole duality of being able to either emerge or easy_install/pip
> packages is very confusing and there really should only be one way of
> installing system-wide packages (emerge). In the meantime, the python eclass
> could perform some sanity checks for packages it is trying to use.

This is more up to the user to not use pip on a system-wide scale, that's generally not what you want to do. Use virtualenvs or something similar.