-
Notifications
You must be signed in to change notification settings - Fork 8
Install Python3 and required modules
This part of the install instruction is about installing Python3 as an alternative install to the Python 2.7 version required of yum.
SPPMon requires at least Python version 3.8.2 or a newer version.
-
Verify the installed Python version.
If it is already version >3.8, you can skip the installation and continue with the requirements below.which python /usr/bin/python -V Python 2.7.5
If this does not show a python path or version, any further install might be troublesome.
Please stop now and read the troubleshooting install instructions first. -
Verify if gcc is installed
GCC is part of the Red Hat Enterprise Linux Development Tools. Install the tool when it's not available on the system.
gcc --version
If it is missing, install it via yum:
sudo yum install gcc
-
Install development libraries and packages
sudo yum -y groupinstall "Development Tools" sudo yum -y install openssl-devel bzip2-devel libffi-devel sudo yum -y install wget
-
Download and install Python 3.9.6 package
mkdir /tmp/python396 cd /tmp/python396/ wget --no-check-certificate https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz cd /tmp/python396/ tar -xvf Python-3.9.6.tgz
-
Compile the Python package
cd /tmp/python396/Python-3.9.6 sudo ./configure sudo make altinstall
-
Verify if the new Python version was installed
python3.9 -V Python 3.9.6 pip3.9 --version pip 21.2.4 from /usr/lib/python3.9/site-packages/pip (python 3.9)
-
Set Python3.9 as alternative
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.9 2 sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 sudo update-alternatives --set python /usr/bin/python2.7
-
Verify current selection
update-alternatives --display python python - status is manual. link currently points to /usr/bin/python2.7 /usr/bin/python2.7 - priority 1 /usr/bin/python3.9 - priority 2 Current `best' version is /usr/bin/python3.9.
-
Create system link to python version 3.9
sudo ln -sf "/usr/local/bin/python3.9" "/usr/bin/python3"
sudo ln -sf "/usr/local/bin/pip3.9" "/usr/bin/pip3"
-
Verify Switch
python3 -V
The SPPMon tool requires some additional Python modules that can be installed using pip. The required modules are specified in the file spectrum-protect-sppmon/python/requirements.txt, which is part of the SPPMon source code.
-
Upgrade pip version
sudo -H python3 -m pip install --upgrade pip
-
Install required packages
sudo -H python3 -m pip install -U -r "./python/requirements.txt"
Any errors while installing python will cause SPPMon not to work. It is important to resolve them before continuing the install process. Common errors are dependencies issues with pip, $PYTHONHOME, and the default python2.7 installation.
In this case, a regular install will not work and cause dependencies issues with pip or python itself. In the worst case, a system reset to a snapshot before the install can be the best option. Restart the install process manually.
- Execute steps 2 and 3 of the section Installation.
- Use yum to install python3.9:
yum install python3.9
instead. Any Python3.9.*
is OK. - Check python install by using
which python3.9
- Create a system link to python3 as described in defining the alternatives section steps 3 and 4.
- Install python3-devel tools:
yum install python3-devel
- Continue regularly with installing the required python packages
If using the install script, you may continue from the
INFLUX_SETUP
point. See skipping installation steps for more information.
- Home
- Frequently asked Questions
- Overview of users
- Contact us
- Share Snapshots of Grafana
- SPPMon Command line arguments
- SPPCheck Command line arguments
- SPPCheck Export PDF Report
- Install Overview
- System Requirements
- Getting SPPMon Source Code
- Create dedicated user accounts in SPP server, vSnap, and VADP
- Create grafana users
- Import Grafana Dashboards