签到成功

知道了

CNDBA社区CNDBA社区

Pip 运行 _blocking_errnos = {errno.EAGAIN, errno.EWOULDBLOCK} 错误解决方法

2019-09-22 10:16 1613 0 原创 Python
作者: Dave

在中标麒麟的6的系统中安装了pip 19.2.3 的版本,但无法使用,报如下错误:

https://www.cndba.cn/dave/article/3717
https://www.cndba.cn/dave/article/3717https://www.cndba.cn/dave/article/3717
https://www.cndba.cn/dave/article/3717
https://www.cndba.cn/dave/article/3717https://www.cndba.cn/dave/article/3717https://www.cndba.cn/dave/article/3717https://www.cndba.cn/dave/article/3717

[dave@www.cndba.cn pip-19.2.3]# pip list
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    load_entry_point('pip==19.2.3', 'console_scripts', 'pip')()
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 299, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2229, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1948, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.6/site-packages/pip-19.2.3-py2.6.egg/pip/_internal/__init__.py", line 19, in <module>
    from pip._vendor.urllib3.exceptions import DependencyWarning
  File "/usr/lib/python2.6/site-packages/pip-19.2.3-py2.6.egg/pip/_vendor/urllib3/__init__.py", line 7, in <module>
    from .connectionpool import (
  File "/usr/lib/python2.6/site-packages/pip-19.2.3-py2.6.egg/pip/_vendor/urllib3/connectionpool.py", line 93
    _blocking_errnos = {errno.EAGAIN, errno.EWOULDBLOCK}
                                    ^
SyntaxError: invalid syntax
[dave@www.cndba.cn pip-19.2.3]# 


[dave@www.cndba.cn pip-9.0.0]# cat /etc/issue
NeoKylin Linux General Server release 6.0  (Dhaulagiri) 
Kernel /r on an /m

[dave@www.cndba.cn pip-9.0.0]# uname -r
2.6.32-220.el6.x86_64

推测是pip 包版本太新,和OS 版本不兼容,将pip版本降低到9.0 后,可以正常使用。https://www.cndba.cn/dave/article/3717https://www.cndba.cn/dave/article/3717

[dave@www.cndba.cn pip-9.0.0]# pip --version
pip 9.0.0 from /usr/lib/python2.6/site-packages/pip-9.0.0-py2.6.egg (python 2.6)
[dave@www.cndba.cn pip-9.0.0]# 
[dave@www.cndba.cn pip-9.0.0]# pip list
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
DEPRECATION: The default format will switch to columns in the future. You can use --format=legacy (or define a list_format in your pip.conf) to disable this warning.
Beaker (1.3.1)
cas (0.15)
cups (1.0)
cupshelpers (1.0)
decorator (3.0.1)
distribute (0.6.10)
ethtool (0.6)
firstboot (1.110)
freeipa (2.0.0a0)
iniparse (0.3.1)
iotop (0.3.2)
ipapython (2.1.3)
iwlib (1.0)
kerberos (1.0)
lxml (2.2.3)
Mako (0.3.4)
MarkupSafe (0.9.2)
matplotlib (0.99.1.1)
netaddr (0.7.5)
nose (0.10.4)
numpy (1.3.0)
paramiko (1.7.5)
pip (9.0.0)
pycrypto (2.0.1)

版权声明:本文为博主原创文章,未经博主允许不得转载。

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
Dave

Dave

关注

人的一生应该是这样度过的:当他回首往事的时候,他不会因为虚度年华而悔恨,也不会因为碌碌无为而羞耻;这样,在临死的时候,他就能够说:“我的整个生命和全部精力,都已经献给世界上最壮丽的事业....."

  • 1879
    原创
  • 2
    翻译
  • 437
    转载
  • 127
    评论
  • 访问:3440021次
  • 积分:3049
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by ZhiXinTech · 皖ICP备19020168号·

        QQ交流群