When the server installs the protobuf-2.6.1 package, the error is as follows:
[[email protected] python]# python setup.py install
Download error on https://pypi.python.org/simple/google-apputils/: [Errno-2] Name or service
Not known--Some packages is not being 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 is not found!
No Local Packages or download links found for google-apputils
Traceback (most recent):
File "setup.py", line $, in <module>
"Protocol buffers is Google's data interchange format."
File "/usr/lib64/python2.7/distutils/core.py", line +, 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 ')
Parsing Google-apputils, unable to find the right distribution requirements
Workaround:
Installation of google-apptuils package can be;
# yum Install-y epel-release
# yum Install Python-pip
# pip Install Google-apputils
# python setup.py Install
Execute again without error;
This article is from the "Model Student's Learning blog" blog, please be sure to keep this source http://mofansheng.blog.51cto.com/8792265/1918244
Python Error: Distutils.errors.DistutilsError workaround