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

Missing modules when executing the script on Debian #11

Open
CiscoDeTours opened this issue Jun 9, 2024 · 2 comments
Open

Missing modules when executing the script on Debian #11

CiscoDeTours opened this issue Jun 9, 2024 · 2 comments

Comments

@CiscoDeTours
Copy link

INFORMATION

- Python version

~$ python3 --version 

Python 3.11.2

- System

~$ neofetch

DEVICE 
•PC: OMEN by HP Laptop 16-c0xxx 
 
SOFTWARE 
•Distro: Debian GNU/Linux 12 (bookworm) 
•Desktop: GNOME 43.9 
•Session: wayland 
•Kernel: 6.6.15-amd64 
•Shell: bash 5.2.15 
•Packages: 2651 (dpkg), 81 (flatpak) 
 
COMPONENTS 
•CPU: AMD Ryzen 9 5900HX with Radeon Graphics (16) @ 4.680GHz 
•GPU: AMD ATI Radeon RX 6600/6600 XT/6600M 
•GPU: AMD ATI Radeon Vega Series / Radeon Vega Mobile Series 
•Memory: 3,47GiB / 14,97GiB (23%) 

EXECUTION SUMMARY

~$ ./omen-fan.py

Traceback (most recent call last):
  File "/home/francisco/Datos/OMEN Fan/./omen-fan.py", line 10, in <module>
    import click
ModuleNotFoundError: No module named 'click'
sudo apt install python3-click

The first missing module is click and can be installed.

$ ./omen-fan.py
Traceback (most recent call last):
  File "/home/francisco/Datos/OMEN Fan/./omen-fan.py", line 11, in <module>
    import tomlkit
ModuleNotFoundError: No module named 'tomlkit'
sudo apt install python3-tomlkit

The second missing module is tomlkit and can be installed too.

~$ ./omen-fan.py

Traceback (most recent call last):
  File "/home/francisco/Datos/OMEN Fan/./omen-fan.py", line 12, in <module>
    from click_aliases import ClickAliasedGroup
ModuleNotFoundError: No module named 'click_aliases'

The third missing module is click_aliases and it's an obstacle because is not present in Debian repositories unlike Arch.

@alou-S
Copy link
Owner

alou-S commented Jun 12, 2024

I think you could globally install it using pip and it should work.

@CiscoDeTours
Copy link
Author

CiscoDeTours commented Jun 22, 2024

The missing module can be installed if a virtual python environment (vpe) is created; tomlkit needed to be reinstalled using pip.

(vpe) ~$ ./omen-fan.py 

Usage: omen-fan.py [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  bios-control (b)      Enable/Disable BIOS control
  boost (x)             Enables boost mode via sysfs
  configure (c,config)  Configure Fan curves for service
  info (i)              Gets Fan status
  service (e)           Start/Stop Fan management service
  set (s)               Set Fan Speed (Disables BIOS control) Fan speed can
                        be...
  version (v)           Gives version info

Root access is requested to make changes but an error message always pops up:

(vpe) ~$ ./omen-fan.py e 1

Root access is required for this command.
Please run the program as root.
(vpe) # ./omen-fan.py e 1

Traceback (most recent call last):
  File "/home/francisco/Datos/OMEN Fan/./omen-fan.py", line 340, in <module>
    cli()
  File "/home/francisco/vpe/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/francisco/vpe/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/francisco/vpe/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/francisco/vpe/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/francisco/vpe/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/francisco/Datos/OMEN Fan/./omen-fan.py", line 249, in service_cli
    load_ec_module()
  File "/home/francisco/Datos/OMEN Fan/./omen-fan.py", line 99, in load_ec_module
    subprocess.run(["modprobe", "ec_sys", "write_support=1"], check=True)
  File "/usr/lib/python3.11/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 1024, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.11/subprocess.py", line 1901, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'modprobe'

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

No branches or pull requests

2 participants