Last active
May 25, 2020 23:03
-
-
Save gargolito/1ec3449c11bdfef72123fab36b1a666c to your computer and use it in GitHub Desktop.
override python2 for tuned on ubuntu with python3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cause | |
tuned expects python2 as its intepreter. the script does not specify the python version and it installs all of the modules are installed in /usr/lib/python2.7/. If you have python3 installed, the service will fail to start because python3 does not have the *tuned* module dependencies. The sanest solution that should survive upgrades and changes to tuned python, is to give the systemd service the correct python environment in which to execute via override. Until, of course, tuned gets ported to python3. | |
tested with tuned 2.9.0-1 in ubuntu 18.04 | |
1. sudo apt-get install tuned | |
2. sudo systemctl edit tuned | |
[Service] | |
Environment=PYTHONHOME=/usr/lib/python2 | |
Environment=PYTHONEXECUTABLE=/usr/bin/python2 | |
Save it | |
3. sudo daemon-reload | |
4. sudo restart tuned | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment