HPE iLO Restful API Redfish Module Problem

Hi,

just another possible reason why redfish install might not work correctly:

In my case, it was a broken urllib module in my cmk 2.1.0p33:


OMD[xxx]:~/local/lib/python3$ python3 -m pip install redfish
Defaulting to user installation because normal site-packages is not writeable
Collecting redfish
  Using cached redfish-3.2.1-py3-none-any.whl (43 kB)
Requirement already satisfied: requests-toolbelt in /opt/omd/versions/2.1.0p33.cee/lib/python3.9/site-packages (from redfish) (0.9.1)
Requirement already satisfied: requests in /opt/omd/versions/2.1.0p33.cee/lib/python3.9/site-packages (from redfish) (2.31.0)
Collecting requests-unixsocket
  Using cached requests_unixsocket-0.3.0-py2.py3-none-any.whl (11 kB)
Collecting jsonpointer
  Using cached jsonpointer-2.4-py2.py3-none-any.whl (7.8 kB)
Collecting jsonpath-rw
  Using cached jsonpath-rw-1.4.0.tar.gz (13 kB)
  Preparing metadata (setup.py) ... done
Collecting jsonpatch
  Using cached jsonpatch-1.33-py2.py3-none-any.whl (12 kB)
Requirement already satisfied: ply in /opt/omd/versions/2.1.0p33.cee/lib/python3.9/site-packages (from jsonpath-rw->redfish) (3.11)
Collecting decorator
  Using cached decorator-5.1.1-py3-none-any.whl (9.1 kB)
Requirement already satisfied: six in /opt/omd/versions/2.1.0p33.cee/lib/python3.9/site-packages (from jsonpath-rw->redfish) (1.16.0)
Requirement already satisfied: idna<4,>=2.5 in /opt/omd/versions/2.1.0p33.cee/lib/python3.9/site-packages (from requests->redfish) (2.10)
Requirement already satisfied: certifi>=2017.4.17 in /opt/omd/versions/2.1.0p33.cee/lib/python3.9/site-packages (from requests->redfish) (2022.12.7)
Requirement already satisfied: charset-normalizer<4,>=2 in /opt/omd/versions/2.1.0p33.cee/lib/python3.9/site-packages (from requests->redfish) (3.2.0)
Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/omd/sites/xxx/local/lib/python3 (from requests->redfish) (2.1.0)
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/opt/omd/sites/xxx/local/lib/python3/urllib3-2.1.0.dist-info/METADATA'

How the directory looks like:

OMD[xxx]:~/local/lib/python3/urllib3-2.1.0.dist-info$ ls
licenses/

I fixed it with:

pip3 install --upgrade --force-reinstall urllib3

and

pip3 install --upgrade --force-reinstall redfish

Regards,
Oliver