IBM Support

Python3 configuration on RHEL when using PowerVC or Novalink

Troubleshooting


Problem

PowerVC and NovaLink applications on Red Hat RHEL OS require access to Python libraries to function. RHEL 8 releases do not set Python3 as the default Python as required by PowerVC and NovaLink. Therefore, the default configuration of RHEL 8 will cause PowerVC and NovaLink operations can fail. 

Symptom

The most common symptoms Python3 not being set as the default Python are
  • PowerVC services can fail to start as python3 libraries are not found.
  • After running the source command against /opt/ibm/powervc/powervcrc, any OpenStack command can fail and return the error, "method or library not found."
  • Novalink can fail to allow Live Partition Mobility (LPM) between systems.

Cause

The cause of these errors is that Python3 has not been configured as the default python version on the RHEL OS.

Environment

RHEL 8.x 

Diagnosing The Problem

To determine which version of Python has been configured as default, run the command alternatives --config python 
The output should have a '+' symbol next to python3. It can have a + next to the no-python or a python2.7 build. 
In the example here, we can see that Python3 is not configured as the default Python.

Selection    Command
-----------------------------------------------

* + 1        /usr/libexec/no-python
    2        /usr/bin/python3

Resolving The Problem

To configure Python3 as the default Python to be used on RHEL, use the command update-alternatives, as shown here:

update-alternatives  --set python /usr/bin/python3

Confirm the new value by running the alternatives command:
alternatives --config python 

In the example here, we can see that Python3 is now configured as the default Python.

Selection    Command
-----------------------------------------------
*  1         /usr/libexec/no-python

+ 2          /usr/bin/python3

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SS2MT9","label":"PowerVC"},"ARM Category":[{"code":"a8m50000000L0jDAAS","label":"PowerVC"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
29 August 2022

UID

ibm16616085