Skip to content

Instantly share code, notes, and snippets.

@bot11
Created February 10, 2015 09:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bot11/66d50ef5272d7dcadc2c to your computer and use it in GitHub Desktop.
Save bot11/66d50ef5272d7dcadc2c to your computer and use it in GitHub Desktop.
devstack errors
stack@devstackmac:~/devstack$ sudo PIP_DOWNLOAD_CACHE=/var/cache/pip HTTP_PROXY= HTTPS_PROXY= NO_PROXY= /usr/local/bin/pip install --build=/tmp/pip-build.RMFAI 'prettytable>=0.7'
The directory '/home/stack/.cache/pip/log' or its parent directory is not owned by the current user and the debug log has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want the -H flag.
The directory '/home/stack/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want the -H flag.
DEPRECATION: --download-cache has been deprecated and will be removed in the future. Pip now automatically uses and configures its cache.
The directory '/home/stack/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want the -H flag.
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 232, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 339, in run
requirement_set.prepare_files(finder)
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 229, in prepare_files
req_to_install.check_if_exists()
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 931, in check_if_exists
self.satisfied_by = pkg_resources.get_distribution(self.req)
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 461, in get_distribution
dist = get_provider(dist)
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 341, in get_provider
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 870, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 740, in resolve
env = Environment(self.entries)
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 927, in __init__
self.scan(search_path)
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 957, in scan
self.add(dist)
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 973, in add
if self.can_add(dist) and dist.has_version():
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2658, in has_version
self.version
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2466, in version
for line in self._get_metadata(self.PKG_INFO):
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2510, in _get_metadata
for line in self.get_metadata_lines(name):
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1927, in get_metadata_lines
return yield_lines(self.get_metadata(name))
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1921, in get_metadata
with open(self.path,'rU') as f:
IOError: [Errno 2] No such file or directory: '/usr/lib/python2.7/dist-packages/setuptools.egg-info'
Solution:
sudo rm /usr/lib/python2.7/dist-packages/setuptools.egg-info
sudo apt-get install --reinstall python-setuptools
@ty-
Copy link

ty- commented Feb 24, 2015

Thank you very much for posting this 👍

@pritidesai
Copy link

Thanks a million for posting this !!!

@s4mdf0o1
Copy link

many thanks ! 👍

@brifordwylie
Copy link

+1

@mahendra
Copy link

😄

@sdia-zz
Copy link

sdia-zz commented May 20, 2015

many thanks ! :D

@colinwilson
Copy link

Super. Thank you ! ✊

@nottoseethesun
Copy link

Working off of the master branch of devstack, I had this error today and fixed it with one of the lines you posted, sudo apt-get install --reinstall python-setuptools . Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment