ImportError: No module named build_clib / pip installs setuptools 36.0.1 when directed to install 30.0.0
envgap__pypa__pip-4724
Original GitHub issue ↗Opened 2017-09-13
01 / FAILURE SIGNATURE
As reported upstream
ERROR:root:Error parsing
Not a benchmark task.
- No curated issue-specific recipe or verified environment fix is available.
02 / ENVIRONMENT RECIPE
- Base commit
Not freshly verified- Manifest
requirements.txt- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
pypa/pip #4724 · read the original issue
* Pip version: 9.0.1
* Python version: 2.7.13
* Operating system: Ubuntu 14.04 (on Travis CI)
### Description (including what I've run):
We test our project on Travis with the minimum Python package versions we specify. A few days ago, it started consistently failing the `pip install .` for our project, in the `setup.py egg_info` step. It turns out that running `python setup.py egg_info` reproduces the same error, as shown here:
```
python setup.py egg_info
ERROR:root:Error parsing
Traceback (most recent call last):
File "/home/travis/virtualenv/python2.7.13/lib/python2.7/site-packages/pbr/core.py", line 111, in pbr
attrs = util.cfg_to_args(path, dist.script_args)
File "/home/travis/virtualenv/python2.7.13/lib/python2.7/site-packages/pbr/util.py", line 264, in cfg_to_args
wrap_commands(kwargs)
File "/home/travis/virtualenv/python2.7.13/lib/python2.7/site-packages/pbr/util.py", line 566, in wrap_commands
cmdclass = ep.resolve()
File "/home/travis/virtualenv/python2.7.13/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2293, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ImportError: No module named build_clib
error in setup command: Error parsing /home/travis/build/zhmcclient/python-zhmcclient/setup.cfg: ImportError: No module named build_clib
```
This happens on Travis with Ubuntu 14.04 and Python 2.7.13 (it uses a virtuel env).
On a locally set up Ubuntu 14.04 with a manually installed Python 2.7.13, in a virtual env, and with the same Python packages and versions installed in that virtual env, and the same pip version, I was not able to reproduce it so far.
The set of Python packages in the virtual env, when it happens on Travis, is:
```
funcsigs (1.0.2)
mock (2.0.0)
nose (1.3.7)
numpy (1.13.1)
pbr (1.10.0)
pip (9.0.1)
py (1.4.34)
pytest (3.2.1)
setuptools (36.0.1)
six (1.10.0)
wheel (0.29.0)
```
With this package state, we then reinstall pip, setuptools, wheel and pbr in single `pip install` commands, to the desired minimum versions. This is done separately from the project install, in order to make sure the install process itself also uses the minimum versions:
```
pip install --upgrade pip
pip install -c minimum-constraints.txt pip
pip install -c minimum-constraints.txt setuptools
pip install -c minimum-constraints.txt wheel
pip install -c minimum-constraints.txt pbr
```
We then install our own project:
```
pip install -c minimum-constraints.txt .
```
Looking at the log reveals that the `pip install setuptools` installs 36.0.1 when asked to install 30.0.0 (via the constraints file):
```
pip install -c minimum-constraints.txt setuptools
Collecting setuptools===30.0.0 (from -c minimum-constraints.txt (line 21))
Downloading setuptools-30.0.0-py2.py3-none-any.whl (472kB)
100% |████████████████████████████████| 481kB 2.4MB/s
Installing collected packages: setuptools
Found existing install04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]
Issue-specific recipe and runtime smoke command require review against the complete issue and repository.
Legacy already_works is install-only; proposed control still requires runtime verification.