We have installed Python (python27-python-pip) package from rhel-server-rhscl-7-rpms repository and ‘pip’ command and latest ‘python’ version is available for ‘root’ user, but not activated for other system users.
I’m not a python expert. But what do you mean with activated?
Usally you write the interpreter in the shebang line of your script. e.g.
#!/usr/bin/python3
import argparse
import sys
import requests
import configparser
import xml.etree.ElementTree as ET
And if you we look into /usr/bin you’ll see /usr/bin/python3 is a hard link to our latest installed python version 3.6.
If we would use the shebang line #!/usr/share/python2 the interpreter would be python 2.7.
So it should be the same at your system.
if the script runs with the root-user and not with the icinga user, it’s usally a (file) permisison problem. So check if your icinga-user is allowed to run the script. if this is ok, another possability is that your script is running an external library or program for that the icinga-user has not enough permissions.