Python Error: Distutils.errors.DistutilsError workaround

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.