Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choosing the right Python interpreter #587

Closed
markuslf opened this issue Jun 17, 2022 · 1 comment
Closed

Choosing the right Python interpreter #587

markuslf opened this issue Jun 17, 2022 · 1 comment
Labels
question Further information is requested

Comments

@markuslf
Copy link
Member

markuslf commented Jun 17, 2022

On RHEL 8, if you install python3, you get Python 3.6. psutil for Python 3.6 is v5.4, which is too old - the disk-io-check will not work.

Alternatively, you can

  • install python3.8 together with python38-psutil (v5.6),
  • and/or python39 together with python39-psutil (v5.8) afterwards,

which both work for the disk-io check. If you use alternatives --config python, you can set your default version for the command python.

The problem: In our Python3 checks, we use the #!/usr/bin/env python3 shebang, which is (on RHEL) currently Python 3.6 - no matter what you set alternatives --config python to (in the following example set to 3.9):

$ python -V
Python 3.9.7

$ python3 -V
Python 3.6.8
$ python3.6 -V
Python 3.6.8
$ python3.8 -V
Python 3.8.12
$ python3.9 -V
Python 3.9.7

If you just install python38 or python39 right from the start and not python3, everything is fine.

How to handle this, if we want to enforce the use of Python 3.8+?

@markuslf markuslf added the question Further information is requested label Jun 17, 2022
@markuslf
Copy link
Member Author

markuslf commented Jun 17, 2022

Ok, it's too early in the morning. Simply let python3 point to python3.8 or python3.9 by using alternatives --config python3 (the "3" at the end makes the difference, of course).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant