Python installation
ls -ls /usr/bin/python*Example:
lrwxrwxrwx 1 root root 9 Aug 4 13:28 /usr/bin/python3 -> python3.6 -rwxr-xr-x 1 root root 6288 Nov 24 15:30 /usr/bin/python3.12 -rwxr-xr-x 1 root root 3378 Nov 24 15:30 /usr/bin/python3.12-config -rwxr-xr-x 2 root root 10560 Aug 4 13:28 /usr/bin/python3.6 lrwxrwxrwx 1 root root 17 Aug 4 13:28 /usr/bin/python3.6-config -> python3.6m-config -rwxr-xr-x 2 root root 10560 Aug 4 13:28 /usr/bin/python3.6m -rwxr-xr-x 1 root root 3440 Aug 4 13:28 /usr/bin/python3.6m-config lrwxrwxrwx 1 root root 16 Aug 4 13:28 /usr/bin/python3-config -> python3.6-configpython3.12 is available in the above example.
# RHEL / Rocky Linux sudo dnf install python3.12 python3.12-pip python3.12-devel # Debian / Ubuntu apt install python3.12 python3.12-dev python3.12-venv(Detailed procedure is beyond the scope of this guide.)
cd ~/xormon-ng/server-nest/ python3.12 -m venv venv # Prediction and Alerting dependencies venv/bin/python3 -m ensurepip --upgrade venv/bin/python3 -m pip install --upgrade pip venv/bin/python3 -m pip install -r microservices/analyzer/requirements/requirements.txt # AI Xbot dependencies python3.12 -m venv pyxbotagent/.venv pyxbotagent/.venv/bin/python -m pip install --upgrade pip pyxbotagent/.venv/bin/python -m pip install -r pyxbotagent/requirements.txtIf you get this error:
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 101] Network is unreachable')': /simple/pip/
Then try to avoid it by using internal proxy for Python packages installation
venv/bin/python3 -m pip install --proxy http://<username>:<password>@<hostname>:<port> --upgrade pip venv/bin/python3 -m pip install --proxy http://<username>:<password>@<hostname>:<port> -r microservices/analyzer/requirements/requirements.txt
cd ~/xormon-ng ./xormon.sh stop ./xormon.sh start