pip install 报错
执行 pip install requests 时,报错:
root@iZ23totlue9Z:~/mine/zz-python# pip install requests Exception: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 246, in main status = self.run(options, args) File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 342, in run requirement_set.prepare_files(finder) File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 345, in prepare_files functools.partial(self._prepare_file, finder)) File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 290, in _walk_req_to_install more_reqs = handler(req_to_install) File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 415, in _prepare_file req_to_install, finder) File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 366, in _check_skip_installed req_to_install.check_if_exists() File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 986, 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 533, in get_distribution dist = get_provider(dist) File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 413, 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 934, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 811, in resolve env = Environment(self.entries) File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 991, in __init__ self.scan(search_path) File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1021, in scan self.add(dist) File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1037, 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 2742, in has_version self.version File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2550, 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 2594, 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 1990, 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 1984, 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'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
安装失败,内存不足,已解决,谢谢
回复
这确定是内存不足引起的?
没安装 setuptools 把 ?