专栏首页python3python错误:distutils.e

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

再次执行没有报错;

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • cobbler MOD_PYTHON E

        这个问题是因为cobbler的web程序在调用时区的时候找不到这样一个模块,去查看/usr/share/cobbler/web/setting.py这个...

    py3study
  • python3 下没办法运行sqlalc

    [root@localhost python]# python3 router.py 

    py3study
  • python爬取主播信息

    执行的时候报错 Traceback (most recent call last): File "e:/personal/vscode/pameinv.py"...

    py3study
  • cobbler相关报错

    原因是因为cobbler的客户端内存给小了,所以提示没有可用的空间,然后把客户端内存给大一点即可

    张琳兮
  • OSError: [Errno 2] No such file or directory

    ['mkdir -p /tmp/gluster_volume_files.can.not.delete']

    党志强
  • Sublime text无法自动通过package control安装插件的研究

    版权声明:署名,允许他人基于本文进行创作,且必须基于与原先许可协议相同的许可协议分发本文 (Creative Commons)

    Jerry Wang
  • Python之Dijango的“坑” hostname, aliases, ipaddrs = gethostbyaddr(name) UnicodeDecodeError: 'utf-8' cod

    错误代码提示: hostname, aliases, ipaddrs = gethostbyaddr(name) UnicodeDecodeError: 'ut...

    用户1214487
  • cobbler MOD_PYTHON E

        这个问题是因为cobbler的web程序在调用时区的时候找不到这样一个模块,去查看/usr/share/cobbler/web/setting.py这个...

    py3study
  • Python 用smtplib库发邮件报错:[WinError 10061] 由于目标计算机积极拒绝,无法连接。解决办法

    看了菜鸟的教程,有这段代码: mail = smtplib.SMTP("localhost") 然后就报错了。菜鸟的教程太老了,Python迭代这么快,根本...

    小蓝枣
  • uwsgi日志中文问题

    开发项目,使用uwsgi,遇到个头痛的问题,如果指定了uwsgi打印日志,当日志中写入中文时,直接会导致报错

    fanspring

扫码关注云+社区

领取腾讯云代金券