docker-compose的pkg resources DistributionNotFound错误对应
Posted firsttry
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了docker-compose的pkg resources DistributionNotFound错误对应相关的知识,希望对你有一定的参考价值。
docker-compose是python写的,使用pip install docker-compose安装的docker-compose有的时候会提示pkg_resources.DistributionNotFound的错误信息,
很多时候都是由于backports.ssl_match_hostname版本的问题,升级backports.ssl_match_hostname一般可以解决该问题。
现象
[root@liumiaocn ~]# docker-compose version
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 3011, in <module>
parse_requirements(__requires__), Environment()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 626, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: backports.ssl-match-hostname>=3.5
[root@liumiaocn ~]#
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
升级backports.ssl_match_hostname
[[email protected] ~]# pip install backports.ssl_match_hostname --upgrade
Collecting backports.ssl_match_hostname
Downloading backports.ssl_match_hostname-3.5.0.1.tar.gz
Installing collected packages: backports.ssl-match-hostname
Found existing installation: backports.ssl-match-hostname 3.4.0.2
Uninstalling backports.ssl-match-hostname-3.4.0.2:
Successfully uninstalled backports.ssl-match-hostname-3.4.0.2
Running setup.py install for backports.ssl-match-hostname ... done
Successfully installed backports.ssl-match-hostname-3.5.0.1
[[email protected] ~]#
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
结果再确认
[root@liumiaocn ~]# docker-compose version
docker-compose version 1.8.1, build 878cff1
docker-py version: 1.10.4
CPython version: 2.7.5
OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
[root@liumiaocn ~]#
- 1
- 2
- 3
- 4
- 5
- 6
再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow
以上是关于docker-compose的pkg resources DistributionNotFound错误对应的主要内容,如果未能解决你的问题,请参考以下文章
Python 打包中 setpy.py settuptools pbr 的了解
spring配置加载maven项目里面的src/main/resoures下的静态资源,配置路径是file:
日常Exception第三十回:Flink异常NoResourceAvailableException: Could not acquire the minimum required resour