Closed
Description
We have a Python module with the following requirements.txt:
cython >= 0.21
nose >= 1.0
setuptools >= 0.8
The initial set up includes both pip install --upgrade pip
and pip install -r requirements.txt
, so we're exposed to new versions of pip immediately.
Following the upgrade to pip 7.1.1, the second step has started to fail. Note that we run this on older RHEL6 machines which come with an old version of setuptools out of the box. Here is the error:
Installing collected packages: cython, nose, setuptools Running setup.py install for cython Found existing installation: setuptools 0.6rc11 Uninstalling setuptools-0.6rc11: Successfully uninstalled setuptools-0.6rc11 Successfully installed cython nose setuptools Traceback (most recent call last): File "/home/adar/python/test_environment/bin/pip", line 8, in <module> load_entry_point('pip==7.1.1', 'console_scripts', 'pip')() File "/home/adar/python/test_environment/lib/python2.6/site-packages/pip/__init__.py", line 217, > in main return command.main(cmd_args) File "/home/adar/python/test_environment/lib/python2.6/site-packages/pip/basecommand.py", line 248, in main pip_version_check(session) File "/home/adar/python/test_environment/lib/python2.6/site-packages/pip/utils/outdated.py", line 102, in pip_version_check pip_version = packaging_version.parse(get_installed_version('pip')) File "/home/adar/python/test_environment/lib/python2.6/site-packages/pip/utils/__init__.py", line 858, in get_installed_version working_set = pkg_resources.WorkingSet() File "/home/adar/python/test_environment/lib/python2.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 629, in __init__ self.add_entry(entry) File "/home/adar/python/test_environment/lib/python2.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 685, in add_entry for dist in find_distributions(entry, True): File "/home/adar/python/test_environment/lib/python2.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2075, in find_eggs_in_zip if metadata.has_metadata('PKG-INFO'): File "/home/adar/python/test_environment/lib/python2.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1605, in has_metadata return self.egg_info and self._has(self._fn(self.egg_info, name)) File "/home/adar/python/test_environment/lib/python2.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1963, in _has return zip_path in self.zipinfo or zip_path in self._index() File "/home/adar/python/test_environment/lib/python2.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1843, in zipinfo return self._zip_manifests.load(self.loader.archive) File "/home/adar/python/test_environment/lib/python2.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1783, in load mtime = os.stat(path).st_mtime OSError: [Errno 2] No such file or directory: '/home/adar/python/test_environment/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg'
I suspect this was due to the move of the pip version check in 7.1.1, and I've successfully worked around it by adding --disable-pip-version-check to the requirements.txt command line, but there's probably still an underlying bug here.