IBM / k8s-storage-perf

This git repo will host the playbooks for collecting performance metrics for a Kubernetes persistent storage for IBM Cloud Paks
Apache License 2.0
9 stars 18 forks source link

Difficulty getting pre-requisites to install correctly #3

Closed ghost closed 1 year ago

ghost commented 2 years ago

Following the instructions (on RHEL 8.6), I get an error in the pre-requisite step pip install openshift. I have tried with both the recommended ansible==2.10.5 and latest ansible.

# pip3 install openshift
Collecting openshift
  Downloading openshift-0.13.1.tar.gz (19 kB)
  Preparing metadata (setup.py) ... done
Collecting kubernetes>=12.0
  Downloading kubernetes-23.6.0-py2.py3-none-any.whl (1.5 MB)
     |████████████████████████████████| 1.5 MB 1.6 MB/s
Collecting python-string-utils
  Downloading python_string_utils-1.0.0-py3-none-any.whl (26 kB)
Requirement already satisfied: six in /usr/lib/python3.6/site-packages (from openshift) (1.11.0)
Requirement already satisfied: setuptools>=21.0.0 in /usr/lib/python3.6/site-packages (from kubernetes>=12.0->openshift) (39.2.0)
Collecting google-auth>=1.0.1
  Downloading google_auth-2.6.6-py2.py3-none-any.whl (156 kB)
     |████████████████████████████████| 156 kB 62.7 MB/s
Collecting certifi>=14.05.14
  Downloading certifi-2022.5.18.1-py3-none-any.whl (155 kB)
     |████████████████████████████████| 155 kB 61.6 MB/s
Collecting requests-oauthlib
  Downloading requests_oauthlib-1.3.1-py2.py3-none-any.whl (23 kB)
Collecting websocket-client!=0.40.0,!=0.41.*,!=0.42.*,>=0.32.0
  Downloading websocket_client-1.3.1-py3-none-any.whl (54 kB)
     |████████████████████████████████| 54 kB 3.1 MB/s
Requirement already satisfied: requests in /usr/lib/python3.6/site-packages (from kubernetes>=12.0->openshift) (2.20.0)
Requirement already satisfied: python-dateutil>=2.5.3 in /usr/lib/python3.6/site-packages (from kubernetes>=12.0->openshift) (2.6.1)
Requirement already satisfied: urllib3>=1.24.2 in /usr/lib/python3.6/site-packages (from kubernetes>=12.0->openshift) (1.24.2)
Collecting pyyaml>=5.4.1
  Downloading PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (603 kB)
     |████████████████████████████████| 603 kB 54.0 MB/s
Collecting rsa<5,>=3.1.4
  Downloading rsa-4.8-py3-none-any.whl (39 kB)
Collecting cachetools<6.0,>=2.0.0
  Downloading cachetools-4.2.4-py3-none-any.whl (10 kB)
Collecting pyasn1-modules>=0.2.1
  Downloading pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
     |████████████████████████████████| 155 kB 64.1 MB/s
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python3.6/site-packages (from requests->kubernetes>=12.0->openshift) (3.0.4)
Requirement already satisfied: idna<2.8,>=2.5 in /usr/lib/python3.6/site-packages (from requests->kubernetes>=12.0->openshift) (2.5)
Collecting oauthlib>=3.0.0
  Downloading oauthlib-3.2.0-py3-none-any.whl (151 kB)
     |████████████████████████████████| 151 kB 65.0 MB/s
Collecting pyasn1<0.5.0,>=0.4.6
  Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
     |████████████████████████████████| 77 kB 6.3 MB/s
Using legacy 'setup.py install' for openshift, since package 'wheel' is not installed.
Installing collected packages: pyasn1, rsa, pyasn1-modules, oauthlib, cachetools, websocket-client, requests-oauthlib, pyyaml, google-auth, certifi, python-string-utils, kubernetes, openshift
  Attempting uninstall: pyyaml
    Found existing installation: PyYAML 3.12
ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
ghost commented 2 years ago

By the way, it works with CentOS 9

bxu1999 commented 1 year ago

I've updated the README instructions to resolve this issue. Here is the gist:

the openshift package installation requires PyYAML >= 5.4.1, and if the existing PyYAML is an older version, then PyYAML's installation will fail. To overcome this issue, manually delete the exsiting PyYAML package as below (adjust the paths in the commands according to the your host environment):

rm -rf /usr/lib64/python3.6/site-packages/yaml rm -f /usr/lib64/python3.6/site-packages/PyYAML-*

Follow the updated README file, and you should not encountered this issue anymore. Thanks.