Hide Forgot
Description of problem: While running insights-client getting FileNotFoundError: [Errno 2] No such file or directory: 'python': 'python' Version-Release number of selected component (if applicable): This is happening on RHEL8 onwards How reproducible: Whenever insights is used on a fresh RHEL8 it gives an error for python as mentioned below. Steps to Reproduce: 1. #Install insights-client.noarch 2. #insights-client --register 3. #insights-client Probably after second steps it will start giving error as follows: # insights-client Fatal error Traceback (most recent call last): File "/var/lib/insights/last_stable.egg/insights/client/phase/v1.py", line 32, in _f func(client, config) File "/var/lib/insights/last_stable.egg/insights/client/phase/v1.py", line 131, in post_update print_egg_versions() File "/var/lib/insights/last_stable.egg/insights/client/utilities.py", line 262, in print_egg_versions env={'PYTHONPATH': egg, 'PATH': os.getenv('PATH')}, stdout=PIPE, stderr=STDOUT) File "/usr/lib64/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib64/python3.6/subprocess.py", line 1364, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'python': 'python' Actual results: As mentioned above it gives the result. Although it is working but giving above error. Expected results: There should not be an error while running insights-client. Additional info: We are about to get rid of this issue by creating a simple symlink to the python package. # sudo ln -s /usr/bin/python3 /usr/bin/python This is just a workaround and needs fix for this.
insights-client should not run the "python" command directly but run the command from sys.executable. The "python" command not being available unless user/admin takes an explicit action is a documented thing for RHEL8.
*** This bug has been marked as a duplicate of bug 1733221 ***