Reputation: 4688
I'm trying to install Ansible on a machine with RHEL 7.2 in order to create an Ansible Server.
I need Ansible v2.4 or newer and for this I've performed the following steps:
1. yum -y install git asciidoc rpm-build python2-devel
2. cd /usr/src
3. git clone git://github.com/ansible/ansible.git --recursive
4. cd ansible
5. git checkout stable-2.4
Since now everything worked fine, but now I want to run this command:
make rpm
and after that: yum install rpm-build/ansible-2.4-0.git201601051704.a2a786e.stable201.el7.centos.noarch.rpm
But when I'm running make rpm
, I received the following error:
Traceback (most recent call last):
File "packaging/release/versionhelper/version_helper.py", line 9, in <module>
from packaging.version import Version, VERSION_PATTERN
ImportError: No module named packaging.version
Makefile:39: *** "version_helper failed". Stop.
Upvotes: 2
Views: 4849
Reputation: 369
In case of rhel7 follow below steps:
install pip using python
wget https://bootstrap.pypa.io/get-pip.py python get-pip.py
install pythonpip
yum install -y python-pip
install packaging
pip install packaging
Upvotes: 0
Reputation: 11
To resolve this error on CentOS 7
First you need to install pip by running:
yum -y install python-pip
Then to clear the errors, run:
pip install packaging
Upvotes: 1
Reputation: 4688
I've just found the solution for my problem:
run pip install packaging
Upvotes: 7