BookmarkSubscribeRSS Feed
AmitSri
Pyrite | Level 9

I am trying to install ansible2.2.1 on redhat7 and receiving error as: error in cryptography setup command: Invalid environment marker: python_version < '3'

7 REPLIES 7
alexal
SAS Employee

@AmitSri,

 

SAS requires Ansible version 2.2.1.x or later. Do not use Ansible 2.2.2. The Ansible controller machine must be connected to the Red Hat Network.

 

On Red Hat Enterprise Linux, the Ansible server requires a Server-Optional subscription in addition to the Base (operating-system) subscription. The managed nodes must also be registered to the Red Hat Network, but a Base subscription is sufficient.

 

The Ansible controller requires Python 2.6 or 2.7. Any nodes that you plan to manage with Ansible require Python 2.4 or a later release. If you are running Python 2.4 or an earlier release on the managed nodes, the python-simplejson encoder for JSON is required. The Ansible controller also requires the following Python modules, which are provided by the Extra Package for Enterprise Linux (EPEL) if the machine is registered:

 

  • paramiko
  • PyYAML
  • jinja2

 

https://support.sas.com/en/documentation/third-party-software-reference/viya/support-for-operating-s...

AmitSri
Pyrite | Level 9

Thanks for your reply Alex!!

 

 

I am not able to install ansible using python pip, what if I install it using yum package manager, is there any difference in between both

methods. please suggest any other alternative to do the same.

 

We have python  2.7 preinstalled on RHEL7+

 

 

 

 

 

JuanS_OCS
Amethyst | Level 16

I subscribe to what Paul said and recommended, same experiences.

However, I am interested: why are you unable to install the recommended Ansible versions with pip?

AmitSri
Pyrite | Level 9

because, when I am trying to install ansible2.2.1 on redhat7, I am receiving error as: error in cryptography setup command: Invalid environment marker: python_version < '3'

PaulHomes
Rhodochrosite | Level 12

I have SAS Viya 3.2 installed on RHEL 7.4 using Python 2.7.5 and Ansible 2.4.0 where Ansible was installed simply via yum. An earlier yum update had pushed my Ansible version from 2.3 to 2.4 and the playbook complained about it being 2.4. I noticed that vars.yml had MAXIMUM_RECOMMENDED_ANSIBLE_VERSION: 2.3 so I changed it to 2.4 to see if it worked. Ansible 2.4 worked for me for this deployment but given the vars.yml had a max of 2.3 I do not know if 2.4 is supported/recommended by SAS.

 

 

AmitSri
Pyrite | Level 9

How can you install Ansible using two package managers python 2.7.5 and yum (as you mentioned: I have SAS Viya 3.2 installed on RHEL 7.4 using Python 2.7.5 and Ansible 2.4.0 where Ansible was installed simply via yum)

JuanS_OCS
Amethyst | Level 16

By having different virtual environments. 

 

Example:

 

# sudo -H pip install ansible==2.1.1.0 if you don't need virtualenv

# virtualenv
sudo -H pip uninstall virtualenv
sudo -H pip uninstall virtualenvwrapper
sudo -H pip install virtualenv
sudo -H pip install virtualenvwrapper --ignore-installed six
sudo -H pip install httplib2
mkdir ~/.virtualenvs
mkdir ~/ansible_virtualenvs

# profile path
echo "source "$(which virtualenvwrapper.sh) >> ~/.profile
echo "export WORKON_HOME=~/.virtualenvs" >> ~/.profile
source ~/.profile

# install and configuration virtualenvs profiles
cd ~/ansible_virtualenvs
mkdir 1.9.4
cd 1.9.4
mkvirtualenv ansible-1.9.4
pip install ansible==1.9.4
ansible --version
deactivate

cd ~/ansible_virtualenvs
mkdir 1.9.5
cd 1.9.5
mkvirtualenv ansible-1.9.5
pip install ansible==1.9.5
ansible --version
deactivate

cd ~/ansible_virtualenvs
mkdir 1.9.6
cd 1.9.6
mkvirtualenv ansible-1.9.6
pip install ansible==1.9.6
ansible --version
deactivate

cd ~/ansible_virtualenvs
mkdir 2.0.0.1
cd 2.0.0.1
mkvirtualenv ansible-2.0.0.1
pip install ansible==2.0.0.1
ansible --version
deactivate

cd ~/ansible_virtualenvs
mkdir 2.0.0.2
cd 2.0.0.2
mkvirtualenv ansible-2.0.0.2
pip install ansible==2.0.0.2
ansible --version
deactivate

cd ~/ansible_virtualenvs
mkdir 2.0.1.0
cd 2.0.1.0
mkvirtualenv ansible-2.0.1.0
pip install ansible==2.0.1.0
ansible --version
deactivate

cd ~/ansible_virtualenvs
mkdir 2.0.2.0
cd 2.0.2.0
mkvirtualenv ansible-2.0.2.0
pip install ansible==2.0.2.0
ansible --version
deactivate

cd ~/ansible_virtualenvs
mkdir 2.1.0.0
cd 2.1.0.0
mkvirtualenv ansible-2.1.0.0
pip install ansible==2.1.0.0
ansible --version
deactivate

cd ~/ansible_virtualenvs
mkdir 2.1.1.0
cd 2.1.1.0
mkvirtualenv ansible-2.1.1.0
pip install ansible==2.1.1.0
ansible --version
deactivate

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 1262 views
  • 2 likes
  • 4 in conversation