Python CMake package fails with pip.req not found
> pip install cmake
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting cmake
Downloading https://files.pythonhosted.org/packages/46/ae/51c30e300f82ada43eaba14cb0157acb03c7c6894efd5129e52338cb41aa/cmake-3.11.0.tar.gz (30.8MB)
100% |████████████████████████████████| 30.8MB 451kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-j8u2macv/cmake/setup.py", line 6, in <module>
from pip.req import parse_requirements
ImportError: No module named 'pip.req'
----------------------------------------
> pip --version
pip 10.0.1 from /home/pi/venv/lib/python3.5/site-packages/pip (python 3.5)
This appears to be a change made in pip 10.x to move the parse_requirements into an internal namespace. There seems to be conflicting opinions on how to address this. The simple answer seems to change the import to try the namespace for 10 else use the one for 9. Otherwise it seems to be a more substantial change to do it the way the python packaging system wants it to be done.
Edited by Bryan Hunt