Hey guys!
I was hoping somebody else had my experience and could help out. I am on Ubunutu 22.04 and the salt script listed above is not playing nice. I try to see if tlp is installed after I run the script but it is not. Grub timeout is also not changed. I am concerned the script is failing as it is giving me a weird error code too.
[ERROR ] Failed to import module pip, this is due most likely to a syntax error:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/salt/loader/lazy.py”, line 766, in _load_module
mod = self.run(spec.loader.load_module)
File “/usr/lib/python3/dist-packages/salt/loader/lazy.py”, line 1201, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File “/usr/lib/python3/dist-packages/salt/loader/lazy.py”, line 1216, in _run_as
return _func_or_method(*args, **kwargs)
File “”, line 548, in _check_name_wrapper
File “”, line 1063, in load_module
File “”, line 888, in load_module
File “”, line 290, in _load_module_shim
File “”, line 719, in _load
File “”, line 688, in _load_unlocked
File “”, line 883, in exec_module
File “”, line 241, in _call_with_frames_removed
File “/usr/lib/python3/dist-packages/salt/modules/pip.py”, line 87, in
import pkg_resources # pylint: disable=3rd-party-module-not-gated
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3267, in
def _initialize_master_working_set():
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3241, in _call_aside
f(*args, **kwargs)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3279, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 573, in _build_master
ws.require(requires)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 891, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 777, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The ‘contextvars’ distribution was not found and is required by salt