kenmoini / ocp4-ai-svc-universal

Ansible automated multi-platform deployment of OpenShift 4 via the Assisted Installer Service
MIT License
5 stars 12 forks source link

Issue while running python3 -m pip install --upgrade -r requirements.txt #8

Closed rrbanda closed 1 year ago

rrbanda commented 1 year ago

Installing collected packages: libvirt-python, jmespath WARNING: Value for scheme.platlib does not match. Please report this to https://github.com/pypa/pip/issues/10151 distutils: /home/openshift/.local/lib/python3.9/site-packages sysconfig: /home/openshift/.local/lib64/python3.9/site-packages WARNING: Additional context: user = True home = None root = None prefix = None Running setup.py install for libvirt-python ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6fegnc5m/libvirt-python_4cea6a2673d84ba891e9e433e2ae3fd0/setup.py'"'"'; file='"'"'/tmp/pip-install-6fegnc5m/libvirt-python_4cea6a2673d84ba891e9e433e2ae3fd0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-tu56uhtc/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/openshift/.local/include/python3.9/libvirt-python cwd: /tmp/pip-install-6fegnc5m/libvirt-python_4cea6a2673d84ba891e9e433e2ae3fd0/ Complete output (55 lines): Package libvirt was not found in the pkg-config search path. Perhaps you should add the directory containing libvirt.pc' to the PKG_CONFIG_PATH environment variable Package 'libvirt', required by 'virtual:world', not found Package libvirt was not found in the pkg-config search path. Perhaps you should add the directory containinglibvirt.pc' to the PKG_CONFIG_PATH environment variable Package 'libvirt', required by 'virtual:world', not found running install /home/openshift/.local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py Package 'libvirt' was not found Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-6fegnc5m/libvirt-python_4cea6a2673d84ba891e9e433e2ae3fd0/setup.py", line 337, in setup(name = 'libvirt-python', File "/home/openshift/.local/lib/python3.9/site-packages/setuptools/init.py", line 87, in setup return distutils.core.setup(**attrs) File "/home/openshift/.local/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 148, in setup return run_commands(dist) File "/home/openshift/.local/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 163, in run_commands dist.run_commands() File "/home/openshift/.local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands self.run_command(cmd) File "/home/openshift/.local/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command super().run_command(command) File "/home/openshift/.local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command cmd_obj.run() File "/home/openshift/.local/lib/python3.9/site-packages/setuptools/command/install.py", line 68, in run return orig.install.run(self) File "/home/openshift/.local/lib/python3.9/site-packages/setuptools/_distutils/command/install.py", line 670, in run self.run_command('build') File "/home/openshift/.local/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/openshift/.local/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command super().run_command(command) File "/home/openshift/.local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command cmd_obj.run() File "/home/openshift/.local/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/home/openshift/.local/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/openshift/.local/lib/python3.9/site-packages/setuptools/dist.py", line 1214, in run_command super().run_command(command) File "/home/openshift/.local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command cmd_obj.run() File "/tmp/pip-install-6fegnc5m/libvirt-python_4cea6a2673d84ba891e9e433e2ae3fd0/setup.py", line 152, in run check_minimum_libvirt_version() File "/tmp/pip-install-6fegnc5m/libvirt-python_4cea6a2673d84ba891e9e433e2ae3fd0/setup.py", line 43, in check_minimum_libvirt_version subprocess.check_call(["pkg-config", File "/usr/lib64/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['pkg-config', '--print-errors', '--atleast-version=0.9.11', 'libvirt']' returned non-zero exit status 1.

ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6fegnc5m/libvirt-python_4cea6a2673d84ba891e9e433e2ae3fd0/setup.py'"'"'; file='"'"'/tmp/pip-install-6fegnc5m/libvirt-python_4cea6a2673d84ba891e9e433e2ae3fd0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-tu56uhtc/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/openshift/.local/include/python3.9/libvirt-python Check the logs for full command output.

rrbanda commented 1 year ago

Error after running

[openshift@localhost ocp4-ai-svc-universal]$ sudo dnf install libvirt-devel libvirt-client libvirt-daemon-kvm
Updating Subscription Management repositories.
Last metadata expiration check: 0:04:10 ago on Tue 18 Apr 2023 09:09:57 AM PDT.
Package libvirt-devel-8.5.0-7.4.el9_1.x86_64 is already installed.
Package libvirt-client-8.5.0-7.4.el9_1.x86_64 is already installed.
Package libvirt-daemon-kvm-8.5.0-7.4.el9_1.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[openshift@localhost ocp4-ai-svc-universal]$ 

[openshift@localhost ~]$ python3 -m pip install --upgrade -r requirements.txt Defaulting to user installation because normal site-packages is not writeable ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt' [openshift@localhost ~]$ cd ocp4-ai-svc-universal/ [openshift@localhost ocp4-ai-svc-universal]$ [openshift@localhost ocp4-ai-svc-universal]$ python3 -m pip install --upgrade -r requirements.txt Defaulting to user installation because normal site-packages is not writeable Collecting git+https://github.com/vmware/vsphere-automation-sdk-python.git (from -r requirements.txt (line 5)) Cloning https://github.com/vmware/vsphere-automation-sdk-python.git to /tmp/pip-req-build-lzpb7ibs Running command git clone -q https://github.com/vmware/vsphere-automation-sdk-python.git /tmp/pip-req-build-lzpb7ibs Resolved https://github.com/vmware/vsphere-automation-sdk-python.git to commit 88d1c65407004cff326daeaa33b0b4e317142b47 Requirement already satisfied: openshift==0.13.1 in /home/openshift/.local/lib/python3.9/site-packages (from -r requirements.txt (line 1)) (0.13.1) Requirement already satisfied: kubernetes in /home/openshift/.local/lib/python3.9/site-packages (from -r requirements.txt (line 2)) (26.1.0) Requirement already satisfied: pyvmomi in /home/openshift/.local/lib/python3.9/site-packages (from -r requirements.txt (line 3)) (7.0.3) Collecting pyvmomi Using cached pyvmomi-8.0.0.1.2.tar.gz (597 kB) Collecting jmespath Using cached jmespath-1.0.1-py3-none-any.whl (20 kB) Requirement already satisfied: libvirt-python in /usr/lib64/python3.9/site-packages (from -r requirements.txt (line 6)) (8.5.0) Collecting libvirt-python Using cached libvirt-python-9.2.0.tar.gz (243 kB) Requirement already satisfied: python-string-utils in /home/openshift/.local/lib/python3.9/site-packages (from openshift==0.13.1->-r requirements.txt (line 1)) (1.0.0) Requirement already satisfied: six in /usr/lib/python3.9/site-packages (from openshift==0.13.1->-r requirements.txt (line 1)) (1.15.0) Requirement already satisfied: websocket-client!=0.40.0,!=0.41.,!=0.42.,>=0.32.0 in /home/openshift/.local/lib/python3.9/site-packages (from kubernetes->-r requirements.txt (line 2)) (1.5.1) Requirement already satisfied: requests-oauthlib in /home/openshift/.local/lib/python3.9/site-packages (from kubernetes->-r requirements.txt (line 2)) (1.3.1) Requirement already satisfied: google-auth>=1.0.1 in /home/openshift/.local/lib/python3.9/site-packages (from kubernetes->-r requirements.txt (line 2)) (2.17.3) Requirement already satisfied: python-dateutil>=2.5.3 in /usr/lib/python3.9/site-packages (from kubernetes->-r requirements.txt (line 2)) (2.8.1) Requirement already satisfied: certifi>=14.05.14 in /home/openshift/.local/lib/python3.9/site-packages (from kubernetes->-r requirements.txt (line 2)) (2022.12.7) Requirement already satisfied: pyyaml>=5.4.1 in /usr/lib64/python3.9/site-packages (from kubernetes->-r requirements.txt (line 2)) (5.4.1) Requirement already satisfied: urllib3>=1.24.2 in /usr/lib/python3.9/site-packages (from kubernetes->-r requirements.txt (line 2)) (1.26.5) Requirement already satisfied: setuptools>=21.0.0 in /home/openshift/.local/lib/python3.9/site-packages (from kubernetes->-r requirements.txt (line 2)) (62.0.0) Requirement already satisfied: requests in /home/openshift/.local/lib/python3.9/site-packages (from kubernetes->-r requirements.txt (line 2)) (2.27.1) Processing //tmp/pip-req-build-lzpb7ibs/lib/vapi-runtime/vapi_runtime-2.37.0-py2.py3-none-any.whl Processing //tmp/pip-req-build-lzpb7ibs/lib/vapi-client-bindings/vapi_client_bindings-4.0.0-py2.py3-none-any.whl Processing //tmp/pip-req-build-lzpb7ibs/lib/vapi-common-client/vapi_common_client-2.37.0-py2.py3-none-any.whl Processing //tmp/pip-req-build-lzpb7ibs/lib/vmc-client-bindings/vmc_client_bindings-1.61.0-py2.py3-none-any.whl Processing //tmp/pip-req-build-lzpb7ibs/lib/nsx-python-sdk/nsx_python_sdk-4.0.1.0.0-py2.py3-none-any.whl Processing //tmp/pip-req-build-lzpb7ibs/lib/nsx-policy-python-sdk/nsx_policy_python_sdk-4.0.1.0.0-py2.py3-none-any.whl Processing //tmp/pip-req-build-lzpb7ibs/lib/nsx-vmc-policy-python-sdk/nsx_vmc_policy_python_sdk-4.0.1.0.0-py2.py3-none-any.whl Processing //tmp/pip-req-build-lzpb7ibs/lib/nsx-vmc-aws-integration-python-sdk/nsx_vmc_aws_integration_python_sdk-4.0.1.0.0-py2.py3-none-any.whl Processing //tmp/pip-req-build-lzpb7ibs/lib/vmc-draas-client-bindings/vmc_draas_client_bindings-1.20.0-py2.py3-none-any.whl Requirement already satisfied: lxml>=4.3.0 in /usr/lib64/python3.9/site-packages (from vSphere-Automation-SDK==1.80.0->-r requirements.txt (line 5)) (4.6.5) Requirement already satisfied: rsa<5,>=3.1.4 in /home/openshift/.local/lib/python3.9/site-packages (from google-auth>=1.0.1->kubernetes->-r requirements.txt (line 2)) (4.9) Requirement already satisfied: pyasn1-modules>=0.2.1 in /home/openshift/.local/lib/python3.9/site-packages (from google-auth>=1.0.1->kubernetes->-r requirements.txt (line 2)) (0.2.8) Requirement already satisfied: cachetools<6.0,>=2.0.0 in /home/openshift/.local/lib/python3.9/site-packages (from google-auth>=1.0.1->kubernetes->-r requirements.txt (line 2)) (5.3.0) Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /home/openshift/.local/lib/python3.9/site-packages (from pyasn1-modules>=0.2.1->google-auth>=1.0.1->kubernetes->-r requirements.txt (line 2)) (0.4.8) Requirement already satisfied: charset-normalizer~=2.0.0 in /home/openshift/.local/lib/python3.9/site-packages (from requests->kubernetes->-r requirements.txt (line 2)) (2.0.12) Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3.9/site-packages (from requests->kubernetes->-r requirements.txt (line 2)) (2.10) Requirement already satisfied: pyOpenSSL==22.0.0 in /home/openshift/.local/lib/python3.9/site-packages (from vapi-runtime@ file://localhost//tmp/pip-req-build-lzpb7ibs/lib/vapi-runtime/vapi_runtime-2.37.0-py2.py3-none-any.whl->vSphere-Automation-SDK==1.80.0->-r requirements.txt (line 5)) (22.0.0) Requirement already satisfied: cryptography==36.0.0 in /home/openshift/.local/lib/python3.9/site-packages (from vapi-runtime@ file://localhost//tmp/pip-req-build-lzpb7ibs/lib/vapi-runtime/vapi_runtime-2.37.0-py2.py3-none-any.whl->vSphere-Automation-SDK==1.80.0->-r requirements.txt (line 5)) (36.0.0) Requirement already satisfied: cffi>=1.12 in /home/openshift/.local/lib/python3.9/site-packages (from cryptography==36.0.0->vapi-runtime@ file://localhost//tmp/pip-req-build-lzpb7ibs/lib/vapi-runtime/vapi_runtime-2.37.0-py2.py3-none-any.whl->vSphere-Automation-SDK==1.80.0->-r requirements.txt (line 5)) (1.15.1) Requirement already satisfied: pycparser in /home/openshift/.local/lib/python3.9/site-packages (from cffi>=1.12->cryptography==36.0.0->vapi-runtime@ file://localhost//tmp/pip-req-build-lzpb7ibs/lib/vapi-runtime/vapi_runtime-2.37.0-py2.py3-none-any.whl->vSphere-Automation-SDK==1.80.0->-r requirements.txt (line 5)) (2.21) Requirement already satisfied: oauthlib>=3.0.0 in /home/openshift/.local/lib/python3.9/site-packages (from requests-oauthlib->kubernetes->-r requirements.txt (line 2)) (3.2.2) nsx-policy-python-sdk is already installed with the same version as the provided wheel. Use --force-reinstall to force an installation of the wheel. vapi-common-client is already installed with the same version as the provided wheel. Use --force-reinstall to force an installation of the wheel. vapi-runtime is already installed with the same version as the provided wheel. Use --force-reinstall to force an installation of the wheel. nsx-python-sdk is already installed with the same version as the provided wheel. Use --force-reinstall to force an installation of the wheel. nsx-vmc-aws-integration-python-sdk is already installed with the same version as the provided wheel. Use --force-reinstall to force an installation of the wheel. nsx-vmc-policy-python-sdk is already installed with the same version as the provided wheel. Use --force-reinstall to force an installation of the wheel. vapi-client-bindings is already installed with the same version as the provided wheel. Use --force-reinstall to force an installation of the wheel. vmc-client-bindings is already installed with the same version as the provided wheel. Use --force-reinstall to force an installation of the wheel. vmc-draas-client-bindings is already installed with the same version as the provided wheel. Use --force-reinstall to force an installation of the wheel. Using legacy 'setup.py install' for libvirt-python, since package 'wheel' is not installed. Installing collected packages: libvirt-python, jmespath WARNING: Value for scheme.platlib does not match. Please report this to https://github.com/pypa/pip/issues/10151 distutils: /home/openshift/.local/lib/python3.9/site-packages sysconfig: /home/openshift/.local/lib64/python3.9/site-packages WARNING: Additional context: user = True home = None root = None prefix = None Running setup.py install for libvirt-python ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3rsjspw4/libvirt-python_17546652b0b84876af840a1a634b1061/setup.py'"'"'; file='"'"'/tmp/pip-install-3rsjspw4/libvirt-python_17546652b0b84876af840a1a634b1061/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-6jr5p7p7/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/openshift/.local/include/python3.9/libvirt-python cwd: /tmp/pip-install-3rsjspw4/libvirt-python_17546652b0b84876af840a1a634b1061/ Complete output (19 lines): running install /home/openshift/.local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build/lib.linux-x86_64-3.9 copying build/libvirt.py -> build/lib.linux-x86_64-3.9 copying build/libvirt_qemu.py -> build/lib.linux-x86_64-3.9 copying build/libvirt_lxc.py -> build/lib.linux-x86_64-3.9 copying build/libvirtaio.py -> build/lib.linux-x86_64-3.9 running build_ext Generated 281 wrapper functions Generated 1 wrapper functions Generated 1 wrapper functions building 'libvirtmod' extension creating build/temp.linux-x86_64-3.9 creating build/temp.linux-x86_64-3.9/build gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I. -I/usr/include/python3.9 -c build/libvirt.c -o build/temp.linux-x86_64-3.9/build/libvirt.o error: command 'gcc' failed: No such file or directory

ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3rsjspw4/libvirt-python_17546652b0b84876af840a1a634b1061/setup.py'"'"'; file='"'"'/tmp/pip-install-3rsjspw4/libvirt-python_17546652b0b84876af840a1a634b1061/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-6jr5p7p7/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/openshift/.local/include/python3.9/libvirt-python Check the logs for full command output.

rrbanda commented 1 year ago

Do a sudo yum install gcc

rrbanda commented 1 year ago

Do a sudo subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms to be able to run dnf install libvirt-devel successfully on RHEL 9