简体   繁体   English

在ansible 2.9中找不到openstacksdk

[英]openstacksdk is not found in ansible 2.9

My environment:我的环境:

python --version  
Python 3.5.2  

pip --version    
pip 19.3.1 from /home/chinmaya/.local/lib/python3.5/site-packages/pip (python 3.5)

ansible --version
ansible 2.9.2
  config file = None  
  configured module search path = ['/home/chinmaya/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']  
  ansible python module location = /usr/local/lib/python3.5/dist-packages/ansible  
  executable location = /usr/local/bin/ansible  
  python version = 3.5.2 (default, Oct  8 2019, 13:06:37) [GCC 5.4.0 20160609]  

Installed and upgrade openstacksdk with following code使用以下代码安装和升级 openstacksdk
pip install --user --upgrade openstacksdk
This installed following packages这安装了以下软件包
Successfully installed certifi-2019.11.28 chardet-3.0.4 decorator-4.4.1 dogpile.cache-0.9.0 idna-2.8 jmespath-0.9.4 jsonpatch-1.24 keystoneauth1-3.18.0 munch-2.5.0 openstacksdk-0.39.0 os-service-types-1.7.0 pbr-5.4.4 requests-2.22.0 requestsexceptions-1.4.0 stevedore-1.31.0 urllib3-1.25.7

Now executed a playbook ansible-playbook installNifiCentos.yml现在执行了一个ansible-playbook installNifiCentos.yml
This gave following error:这给出了以下错误:
在此处输入图片说明

Now I am getting no clue to solve this issue.现在我没有线索来解决这个问题。

I was getting all such conflicts probably due to both python versions.由于两个python版本,我都遇到了所有此类冲突。 I decided to remove the python 2.7 and keep only one Python 3.5.2.我决定删除 python 2.7,只保留一个 Python 3.5.2。 After removing Python 2.7, this started working.删除 Python 2.7 后,这开始工作。 Still, I don't know where was the problem.尽管如此,我不知道问题出在哪里。

I have removed python 2.7 and done the upgrade.我已经删除了 python 2.7 并完成了升级。 Then installed openstack client using pip3.然后使用 pip3 安装 openstack 客户端。 This worked for me.这对我有用。

sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install -y python3-pip

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM