:: Re: [DNG] tryng to install virt-man…
Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Mario Marietto
Ημερομηνία:  
Προς: dng@d404.nl
Υ/ο: dng
Αντικείμενο: Re: [DNG] tryng to install virt-manager on Devuan 4 : ModuleNotFoundError: No module named 'gi'
Thanks. I solved this problem,by copying "lsb_release.py" to
"/usr/lib/python3.9_/dist-packages"

and then I did :

root@devuan:/usr/local/lib/python3.10# pip install PyGObject

Collecting PyGObject
 Downloading PyGObject-3.44.1.tar.gz (720 kB)
    |████████████████████████████████| 720 kB 2.4 MB/s
 Installing build dependencies ... done
 Getting requirements to build wheel ... done
   Preparing wheel metadata ... done
Collecting pycairo>=1.16.0
 Using cached pycairo-1.24.0-cp310-cp310-linux_armv7l.whl
Building wheels for collected packages: PyGObject
 Building wheel for PyGObject (PEP 517) ... done
 Created wheel for PyGObject:
filename=PyGObject-3.44.1-cp310-cp310-linux_armv7l.whl size=757511
sha256=97ef2
e2e90fee4b0249542ff3fa7c14c3778742ca59fb536cfb10c3a9f35a287
 Stored in directory:
/root/.cache/pip/wheels/33/99/2c/061d0c6934509a9cc08470980d68fbfc972bd22a45c3f306d6


Successfully built PyGObject
Installing collected packages: pycairo, PyGObject
Successfully installed PyGObject-3.44.1 pycairo-1.24.0
WARNING: You are using pip version 20.3.4; however, version 23.2.1 is
available.
You should consider upgrading via the '/usr/bin/python -m pip install
--upgrade pip' command.

but the virt-manager is still broken.

root@devuan:/usr/local/lib/python3.10# 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'

On Sun, Aug 20, 2023 at 4:04 PM dng@??? <dng@???> wrote:

> 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 PyGObjectERROR: 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
> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>



--
Mario.