:: Re: [DNG] tryng to install virt-man…
Góra strony
Delete this message
Reply to this message
Autor: dng@d404.nl
Data:  
Dla: dng
Temat: Re: [DNG] tryng to install virt-manager on Devuan 4 : ModuleNotFoundError: No module named 'gi'
On 20-08-2023 15:46, Mario Marietto via Dng wrote:
> Hello to everyone.
>
> I've installed virt-manager on Devuan 4 installed on my ARM
> chromebook,because it is very comfortable to use it to virtualize the
> various guests. Unfortunately,when I run virt-manager I get this error :
>
>
> root@devuan:~# virt-manager
> Traceback (most recent call last):
>  File "/usr/bin/virt-manager", line 6, in <module>
>    from virtManager import virtmanager
>  File "/usr/share/virt-manager/virtManager/virtmanager.py", line 15,
> in <module>
>    import gi
> ModuleNotFoundError: No module named 'gi'
>
>
> Google a little bit I found this post :
>
>
> https://askubuntu.com/questions/80448/what-would-cause-the-gi-module-to-be-missing-from-python
>
>
> where there are 3 solutions to fix the problem,that I tried,but none
> of them worked.
>
> 1.
>
>     The simple way:

>
>     |sudo apt install python3-gi|-----> python3-gi is already the newest version (3.38.0-2). ||
> 2.

>
>     The vext <https://stackoverflow.com/a/43808204/5209935> way, for
>     virtualenv users:

>
>     |pip install vext : |ERROR: Exception:Traceback (most recent call last): File
>     "/usr/local/lib/python3.10/site-packages/pip/_internal/cli/base_command.py",
>     line 223, in _main   status = self.run(options, args) File
>     "/usr/local/lib/python3.10/site-packages/pip/_internal/cli/req_command.py",
>     line 180, in wrapper   return func(self, options, args) File
>     "/usr/local/lib/python3.10/site-packages/pip/_internal/commands/install.py",
>     line 271, in run   session =
>     self.get_default_session(options) File
>     "/usr/local/lib/python3.10/site-packages/pip/_internal/cli/req_command.py",
>     line 78, in get_default_session    self._session =
>     self.enter_context(self._build_session(options)) File
>     "/usr/local/lib/python3.10/site-packages/pip/_internal/cli/req_command.py",
>     line 88, in _build_session   session = PipSession( File
>     "/usr/local/lib/python3.10/site-packages/pip/_internal/network/session.py",
>     line 248, in __init__   self.headers["User-Agent"] =
>     user_agent() File
>     "/usr/local/lib/python3.10/site-packages/pip/_internal/network/session.py",
>     line 131, in user_agent   zip(["name", "version", "id"],
>     distro.linux_distribution()), File
>     "/usr/local/lib/python3.10/site-packages/pip/_vendor/distro.py",
>     line 125, in linux_distribution   return
>     _distro.linux_distribution(full_distribution_name) File
>     "/usr/local/lib/python3.10/site-packages/pip/_vendor/distro.py",
>     line 681, in linux_distribution   self.version(), File
>     "/usr/local/lib/python3.10/site-packages/pip/_vendor/distro.py",
>     line 741, in version   self.lsb_release_attr('release'), File
>     "/usr/local/lib/python3.10/site-packages/pip/_vendor/distro.py",
>     line 903, in lsb_release_attr   return
>     self._lsb_release_info.get(attribute, '') File
>     "/usr/local/lib/python3.10/site-packages/pip/_vendor/distro.py",
>     line 556, in __get__   ret = obj.__dict__[self._fname] =
>     self._f(obj) File
>     "/usr/local/lib/python3.10/site-packages/pip/_vendor/distro.py",
>     line 1014, in _lsb_release_info   stdout =
>     subprocess.check_output(cmd, stderr=devnull) File
>     "/usr/local/lib/python3.10/subprocess.py", line 421, in
>     check_output   return run(*popenargs, stdout=PIPE,
>     timeout=timeout, check=True, File
>     "/usr/local/lib/python3.10/subprocess.py", line 526, in
>     run   raise CalledProcessError(retcode,
>     process.args,subprocess.CalledProcessError: Command
>     '('lsb_release', '-a')' returned non-zero exit status 1. ||
> 3.

>
>     The pure Python developer way:

>
>     Install a bunch of developer stuff:

>
>     |sudo apt install pkg-config libcairo2-dev gcc python3-dev
>     libgirepository1.0-dev |

>
>     Install the python package:

>
>     |pip install PyGObject : |root@devuan:~# pip install PyGObject ERROR: Exception:Traceback
>     (most recent call last): File
>     "/usr/local/lib/python3.10/site-packages/pip/_internal/cli/base_command.py",
>     line 223, in _main   status = self.run(options, args) File
>     "/usr/local/lib/python3.10/site-packages/pip/_internal/cli/req_command.py",
>     line 180, in wrapper   return func(self, options, args) File
>     "/usr/local/lib/python3.10/site-packages/pip/_internal/commands/install.py",
>     line 271, in run   session =
>     self.get_default_session(options) File
>     "/usr/local/lib/python3.10/site-packages/pip/_internal/cli/req_command.py",
>     line 78, in get_default_session    self._session =
>     self.enter_context(self._build_session(options)) File
>     "/usr/local/lib/python3.10/site-packages/pip/_internal/cli/req_command.py",
>     line 88, in _build_session   session = PipSession( File
>     "/usr/local/lib/python3.10/site-packages/pip/_internal/network/session.py",
>     line 248, in __init__   self.headers["User-Agent"] =
>     user_agent() File
>     "/usr/local/lib/python3.10/site-packages/pip/_internal/network/session.py",
>     line 131, in user_agent   zip(["name", "version", "id"],
>     distro.linux_distribution()), File
>     "/usr/local/lib/python3.10/site-packages/pip/_vendor/distro.py",
>     line 125, in linux_distribution   return
>     _distro.linux_distribution(full_distribution_name) File
>     "/usr/local/lib/python3.10/site-packages/pip/_vendor/distro.py",
>     line 681, in linux_distribution   self.version(), File
>     "/usr/local/lib/python3.10/site-packages/pip/_vendor/distro.py",
>     line 741, in version   self.lsb_release_attr('release'), File
>     "/usr/local/lib/python3.10/site-packages/pip/_vendor/distro.py",
>     line 903, in lsb_release_attr   return
>     self._lsb_release_info.get(attribute, '') File
>     "/usr/local/lib/python3.10/site-packages/pip/_vendor/distro.py",
>     line 556, in __get__   ret = obj.__dict__[self._fname] =
>     self._f(obj) File
>     "/usr/local/lib/python3.10/site-packages/pip/_vendor/distro.py",
>     line 1014, in _lsb_release_info   stdout =
>     subprocess.check_output(cmd, stderr=devnull) File
>     "/usr/local/lib/python3.10/subprocess.py", line 421, in
>     check_output   return run(*popenargs, stdout=PIPE,
>     timeout=timeout, check=True, File
>     "/usr/local/lib/python3.10/subprocess.py", line 526, in
>     run   raise CalledProcessError(retcode,
>     process.args,subprocess.CalledProcessError: Command
>     '('lsb_release', '-a')' returned non-zero exit status 1. ||

>
> What else can I try ?
>
> --
> Mario.
>

You can install lsb-release which will contain the command lsb_release.
Watch the hyphen - and the underscore _ in the names

Grtz

Nick