python错误:distutils.e
服务器安装protobuf-2.6.1包时,报错如下:
[root@host73 python]# python setup.py install
Download error on https://pypi.python.org/simple/google-apputils/: [Errno -2] Name or service
not known -- Some packages may not be found!
Couldn't find index page for 'google-apputils' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known --
Some packages may not be found!
No local packages or download links found for google-apputils
Traceback (most recent call last):
File "setup.py", line 200, in <module>
"Protocol Buffers are Google's data interchange format.",
File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 265, in __init__
self.fetch_build_eggs(attrs.pop('setup_requires'))
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 289, in fetch_build_eggs
parse_requirements(requires), installer=self.fetch_build_egg
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 618, in resolve
dist = best[req.key] = env.best_match(req, self, installer)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 862, in best_match
return self.obtain(req, installer) # try and download/install
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 874, in obtain
return installer(requirement)
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 339, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 617, in
easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse
('google-apputils')
字面意思为:解析google-apputils,找不到合适的分布需求
解决办法:
安装google-apptuils包即可;
# yum install -y epel-release
# yum install python-pip
# pip install google-apputils
# python setup.py install
再次执行没有报错;
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341