From 90266f4cc8e3347d7529eb3ce4dfb89b8c760f6e Mon Sep 17 00:00:00 2001 From: Ben Sartori <149951068+bensartori@users.noreply.github.com> Date: Fri, 7 Jun 2024 06:59:46 +0200 Subject: [PATCH] Error message improvement. --- lednamebadge.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lednamebadge.py b/lednamebadge.py index 35b3f3d..37402b6 100755 --- a/lednamebadge.py +++ b/lednamebadge.py @@ -739,11 +739,13 @@ class LedNameBadge: @staticmethod def _print_common_install_hints(): print(" (You may need to use pip3 or pip2 instead of pip depending on your python version.)") - print(" (You may need prepend 'sudo' for system wide module installation.)") + if sys.platform.startswith('win'): + print(" (You may need to run cmd.exe as Administrator for system wide module installation.)") if sys.platform.startswith('linux'): - print(" (You may also use your package manager, but the exact package might be different.") + print(" (You may need prepend 'sudo' for system wide module installation.)") + print(" (You may also use your package manager, but the exact package name might be different.") print(" E.g. 'sudo apt install python3-usb' for pyusb)") - + def main(): parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter,