Centos7 docker-py似乎没有安装 [英] Centos7 docker-py doesn't seem to be installed

查看:1299
本文介绍了Centos7 docker-py似乎没有安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了Centos7,然后:ansible,docker,pip和使用pip我安装了docker-py。



版本:

- Docker版本1.6.0,构建8aae715 / 1.6.0

- ansible 1.9.1 < br>
- docker_py-1.2.2



尝试运行一个手册,例如

 
- name:redis container
docker:
name:myredis
image:redis
state:started

我收到msg: docker-py 似乎没有安装,但是可用的Docker模块是必需的。 p>

我看不到问题。是CentOS,docker和ansible版本吗?



PS:我禁用了防火墙和SELinux



任何想法?
谢谢

解决方案

我发现docker-py模块有几个问题。经过他们之后,我结束了这个:

   -  name:Docker-PY 
pip:
名称:{{item}}
with_items:
- six == 1.4
- docker-py == 1.1.0
/ pre>

首先,我遇到了你的问题。解决方案是明确设置最新版本的六个,如下所述: https://github.com/docker/ docker-py / issues / 344



之后,遇到一个问题(你也可能遇到这个问题) py 1.2.2版本。解决方法是按照以下描述指定旧版本: https://github.com/ansible/ansible-模块核心/问题/ 1227 。做一个pip卸载docker-py来摆脱更新的版本。



如果你没有使用ansible安装它们,那么这样做:

  [sudo] pip uninstall docker-py 
[sudo] pip install six == 1.4
[sudo] pip install docker- py == 1.1.0


I installed Centos7 minimal and then: ansible, docker, pip and using pip I installed docker-py.

Versions:
- Docker version 1.6.0, build 8aae715/1.6.0
- ansible 1.9.1
- docker_py-1.2.2

Trying to run a playbook, for example

- name: redis container
  docker:
    name: myredis
    image: redis
    state: started

i get msg: docker-py doesn't seem to be installed, but is required for the Ansible Docker module.

I can't see the problem. Is it the CentOS, docker and ansible version?

PS: I disabled the firewalld and SELinux

Any ideas? Thanks

解决方案

I found a couple problems with the docker-py module. After I worked through them I ended up with this:

  - name: Docker-PY
    pip:
      name: "{{ item }}"
    with_items:
    - six==1.4
    - docker-py==1.1.0

First, I ran into your problem. The solution is to explicitly set the most recent version of six as described here: https://github.com/docker/docker-py/issues/344.

After that, I ran into an issue (you might run into it too) with a bug in the docker-py 1.2.2 version. The workaround is to specify an older version as described here: https://github.com/ansible/ansible-modules-core/issues/1227. Do a pip uninstall docker-py to get rid of the newer version.

If you aren't using ansible to install these then do this:

[sudo] pip uninstall docker-py
[sudo] pip install six==1.4
[sudo] pip install docker-py==1.1.0

这篇关于Centos7 docker-py似乎没有安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆